diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 7d5e9043..c6d9887f 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -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 diff --git a/sfall/HookScripts.cpp b/sfall/HookScripts.cpp index a4286845..e2c614b1 100644 --- a/sfall/HookScripts.cpp +++ b/sfall/HookScripts.cpp @@ -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); + } } } diff --git a/sfall/Inventory.cpp b/sfall/Inventory.cpp index de5e172f..fa3cf153 100644 --- a/sfall/Inventory.cpp +++ b/sfall/Inventory.cpp @@ -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); diff --git a/sfall/PartyControl.cpp b/sfall/PartyControl.cpp index 96185f8c..450e9390 100644 --- a/sfall/PartyControl.cpp +++ b/sfall/PartyControl.cpp @@ -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 { diff --git a/sfall/dinput.cpp b/sfall/dinput.cpp index c83bb1ca..ee6c24a4 100644 --- a/sfall/dinput.cpp +++ b/sfall/dinput.cpp @@ -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);