Skip to content

Commit

Permalink
Fix edge case where a multiplayer auto-save could be created after a …
Browse files Browse the repository at this point in the history
…desync had happened
  • Loading branch information
Rampastring committed Jun 25, 2024
1 parent 318a4c1 commit 4974d94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/recon_kick.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
;;; broadcast a REMOVEPLAYER message to everyone.

cextern SavesDisabled
cextern IsDoingMPSaveNextFrame

sstring str_PlayerOutOfSync, "Player has gone out of sync"
sstring str_PlayerOutOfSync, "Player has gone out of sync and has been removed from the game."
@LJNZ 0x005B4F5F, _Execute_DoList_dont_recon

section .bss
Expand Down Expand Up @@ -73,6 +74,11 @@ _Execute_DoList_dont_recon:
pop ebx
pop esi

; Disable auto-saving
mov dword [AutoSaveGame], -1
mov byte [SavesDisabled], 1
mov byte [IsDoingMPSaveNextFrame], 0

lea eax, [esi+ebx] ; Write SYNC file
and eax, dword 0xFFF
lea ecx, [eax+eax*2]
Expand All @@ -89,6 +95,7 @@ _Execute_DoList_dont_recon:
hack 0x00494EE4
mov dword [AutoSaveGame], -1
mov byte [SavesDisabled], 1
mov byte [IsDoingMPSaveNextFrame], 0
mov eax, [esi+0x6]
cmp byte [OutOfSyncArray+eax], 1
jz 0x00494F1D
Expand Down

0 comments on commit 4974d94

Please sign in to comment.