Show a console error if the gamestate contains too many tables

This commit is contained in:
Alug committed 2024-09-07 17:30:08 +02:00
1 parent 4f532b766f
commit 8a8db796be
2 files changed
+9 -1

No files matched your search

-1
View File
@@ -2642,7 +2642,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
// Call it only once by tic
if (*oldtic != I_GetTime())
{
INT32 key;
I_OsPolling();
+9
View File
@@ -670,8 +670,17 @@ static UINT8 ArchiveValue(int TABLESINDEX, int myindex)
lua_pop(gL, 1);
}
if (!found)
{
t++;
if (t == 0)
{
CONS_Alert(CONS_ERROR, "Too many tables to archive!\n");
WRITEUINT8(save_p, ARCH_NULL);
return 0;
}
}
WRITEUINT8(save_p, ARCH_TABLE);
WRITEUINT16(save_p, t);