Added the original Fallout 1 behavior to FastShotFix (#335)

This commit is contained in:
NovaRain
2020-09-06 08:30:20 +08:00
parent 2badb5fdd2
commit a7355ad937
2 changed files with 8 additions and 2 deletions
+3 -2
View File
@@ -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
+5
View File
@@ -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: