Changed the debug editor to require sfall debugging mode.

Some minor code edits.
This commit is contained in:
NovaRain
2018-10-29 11:14:30 +08:00
parent a3b456cf0a
commit 712b4de5f7
5 changed files with 12 additions and 9 deletions
+4 -3
View File
@@ -165,8 +165,9 @@ ItemFastMoveKey=29
;Requires ItemFastMoveKey to be enabled
FastMoveFromContainer=0
;A key to press to open a debug game editor (requires FalloutClient.exe from the modders pack)
;A key to press to open a debug game editor
;Set to 0 to disable, or a DX scancode otherwise
;Requires sfall debugging mode and FalloutClient.exe from the modders pack
DebugEditorKey=0
;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -668,12 +669,12 @@ DebugMode=0
SkipCompatModeCheck=0
;Set to 1 to skip the executable file size check
;Does not require enabling sfall debugging mode
;Does not require sfall debugging mode
SkipSizeCheck=0
;If you're testing changes to the Fallout exe, you can override the CRC that sfall looks for here
;You can use several hex values, separated by commas
;Does not require enabling sfall debugging mode
;Does not require sfall debugging mode
;ExtraCRC=0x00000000,0x00000000
;Set to 1 to stop Fallout from deleting non readonly protos at startup
+5 -3
View File
@@ -1134,7 +1134,7 @@ void _stdcall RegisterHook( DWORD script, DWORD id, DWORD procNum )
}
static void LoadHookScript(const char* name, int id) {
if (id >= numHooks) return;
if (id >= numHooks || isGameScript(name)) return;
char filename[MAX_PATH];
sprintf(filename, "scripts\\%s.int", name);
@@ -1145,7 +1145,7 @@ static void LoadHookScript(const char* name, int id) {
mov fileExist, al
}
if (fileExist && !isGameScript(name)) {
if (fileExist) {
sScriptProgram prog;
dlog(">", DL_HOOK);
dlog(name, DL_HOOK);
@@ -1158,7 +1158,9 @@ static void LoadHookScript(const char* name, int id) {
hook.isGlobalScript = false;
hooks[id].push_back(hook);
AddProgramToMap(prog);
} else dlogr(" Error!", DL_HOOK);
} else {
dlogr(" Error!", DL_HOOK);
}
}
}
+1 -1
View File
@@ -807,7 +807,7 @@ void InventoryInit() {
// Move items out of bag/backpack and back into the main inventory list by dragging them to character's image
// (similar to Fallout 1 behavior)
HookCall(0x471457, &inven_pickup_hook);
HookCall(0x471457, inven_pickup_hook);
// Move items to player's main inventory instead of the opened bag/backpack when confirming a trade
SafeWrite32(0x475CF2, _stack);
+1 -1
View File
@@ -254,7 +254,7 @@ static void __stdcall DisplayCantDoThat() {
// 1 skip handler, -1 don't skip
int __stdcall PartyControl_SwitchHandHook(TGameObj* item) {
if (ItemGetType(item) == 3 && IsControllingNPC > 0) {
if (IsControllingNPC > 0 && ItemGetType(item) == 3) {
int canUse;
/* check below uses AI packets and skills to check if weapon is usable
__asm {
+1 -1
View File
@@ -424,7 +424,7 @@ HRESULT _stdcall FakeDirectInputCreate(HINSTANCE a, DWORD b, IDirectInputA** c,
BackgroundKeyboard = GetPrivateProfileInt("Input", "BackgroundKeyboard", 0, ini) != 0;
BackgroundMouse = GetPrivateProfileInt("Input", "BackgroundMouse", 0, ini) != 0;
DebugEditorKey = GetPrivateProfileInt("Input", "DebugEditorKey", 0, ini);
if (IsDebug) DebugEditorKey = GetPrivateProfileInt("Input", "DebugEditorKey", 0, ini);
*c = (IDirectInputA*)new FakeDirectInput(*c);