diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 04ceed32..bea7f19d 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -535,9 +535,10 @@ RemoveCriticalTimelimits=0 ;MainMenuBigFontColour=0x3C ;Alternative behaviors to the Fast Shot trait -;0 - Fallout 2 original behavior: -1 AP cost for ranged weapons; no aimed shots for all attacks -;1 - Haenlomal's fix: aimed shots are enabled for melee/unarmed weapons and HtH attacks +;0 - Fallout 2 original behavior: -1 AP cost for ranged weapons; aimed attacks are disabled +;1 - Haenlomal's fix: aimed attacks are enabled for melee/unarmed weapons and HtH attacks ;2 - Alternative behavior: apply -1 AP cost to melee/unarmed weapons and HtH attacks +;3 - Fallout 1 original behavior: -1 AP cost for all weapons; aimed attacks are disabled FastShotFix=1 ;Set to 1 to boost the maximum number of script names from 1450 to 10000 diff --git a/sfall/Modules/Perks.cpp b/sfall/Modules/Perks.cpp index b460ab82..3a273b0b 100644 --- a/sfall/Modules/Perks.cpp +++ b/sfall/Modules/Perks.cpp @@ -1286,6 +1286,11 @@ static void FastShotTraitFix() { SafeWrite16(0x478C9F, 0x9090); HookCalls((void*)0x478C7D, {0x478BB8, 0x478BC7, 0x478BD6, 0x478BEA, 0x478BF9, 0x478C08, 0x478C2F}); goto done; + case 3: + dlog("Applying Fast Shot trait patch. (Fallout 1 behavior)", DL_INIT); + HookCall(0x478C97, (void*)fo::funcoffs::item_hit_with_); + SafeWrite16(0x478C9E, CodeType::JumpZ << 8); // ignore all unarmed attacks (cmp eax, 0; jz) + goto done; default: dlog("Applying Fast Shot trait fix.", DL_INIT); fix: