Added the original Fallout 1 behavior to FastShotFix

This commit is contained in:
NovaRain
2020-09-06 08:45:17 +08:00
parent 398ad650b9
commit 55e935e18c
2 changed files with 10 additions and 3 deletions
+3 -2
View File
@@ -519,9 +519,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
+7 -1
View File
@@ -1043,12 +1043,18 @@ static void FastShotTraitFix() {
dlog("Applying Fast Shot trait patch. (Haenlomal's fix)", DL_INIT);
MakeJump(0x478E79, item_w_called_shot_hack);
goto fix;
case 2:
case 2: {
dlog("Applying Fast Shot trait patch. (Alternative behavior)", DL_INIT);
SafeWrite16(0x478C9F, 0x9090);
const DWORD fastShotFixF1[] = {0x478BB8, 0x478BC7, 0x478BD6, 0x478BEA, 0x478BF9, 0x478C08, 0x478C2F};
HookCalls((void*)0x478C7D, fastShotFixF1);
goto done;
}
case 3:
dlog("Applying Fast Shot trait patch. (Fallout 1 behavior)", DL_INIT);
HookCall(0x478C97, (void*)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: