mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed player's base EMP DR isn't properly initialized when creating a new character and then starting the game.
This commit is contained in:
@@ -152,6 +152,13 @@ end:
|
||||
}
|
||||
}
|
||||
|
||||
static void __declspec(naked) SetPCBaseStatEMP() {
|
||||
__asm {
|
||||
mov ds:[29*4 + 0x51C394], 100; // set_pc_base_stat(STAT_dmg_resist_emp, 100)
|
||||
retn;
|
||||
}
|
||||
}
|
||||
|
||||
// Called right before savegame slot is being loaded
|
||||
static void _stdcall LoadGame_Before() {
|
||||
onBeforeGameStart.invoke();
|
||||
@@ -457,6 +464,7 @@ static void __declspec(naked) AutomapHook() {
|
||||
}
|
||||
|
||||
void LoadGameHook::init() {
|
||||
LoadGameHook::OnAfterGameStarted() += SetPCBaseStatEMP;
|
||||
saveInCombatFix = GetConfigInt("Misc", "SaveInCombatFix", 1);
|
||||
if (saveInCombatFix > 2) saveInCombatFix = 0;
|
||||
saveFailMsg = Translate("sfall", "SaveInCombat", "Cannot save at this time");
|
||||
|
||||
Reference in New Issue
Block a user