If corrupted save received, leave netgame

This commit is contained in:
indev authored and Alug committed 2024-10-12 22:09:20 +02:00
1 parent d0c50c49a7
commit cb94235ac1
1 file changed
+5
+5
View File
@@ -22,6 +22,8 @@
#include "p_saveg.h"
#include "p_local.h"
#include "p_slopes.h" // for P_SlopeById
#include "s_sound.h"
#include "m_menu.h"
#ifdef LUA_ALLOW_BYTECODE
#include "d_netfil.h" // for LUA_DumpFile
#endif
@@ -1023,6 +1025,9 @@ static UINT8 UnArchiveValue(UINT8 **p, int TABLESINDEX)
return 1;
default:
CONS_Alert(CONS_ERROR, "Unknown value type unarchived, save is corrupted!\n");
G_SetExitGameFlag();
S_StartSound(NULL, sfx_syfail); // he he he
M_StartMessage(M_GetText("Corrupted save received\nPress ESC\n"), NULL, MM_NOTHING);
return 1;
}
return 0;