mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Return for both players and mobjs if they've got an empty table, instead of just mobjs
This commit is contained in:
parent
0b836a9841
commit
beb9b0f103
1 changed files with 5 additions and 1 deletions
|
@ -715,11 +715,15 @@ static void ArchiveExtVars(void *pointer, const char *ptype)
|
|||
for (i = 0; lua_next(gL, -2); i++)
|
||||
lua_pop(gL, 1);
|
||||
|
||||
if (i == 0 && !fastcmp(ptype,"player")) // skip anything that has an empty table and isn't a player.
|
||||
// skip anything that has an empty table and isn't a player.
|
||||
if (i == 0)
|
||||
{
|
||||
if (fastcmp(ptype,"player")) // always include players even if they have no extra variables
|
||||
WRITEUINT16(save_p, 0);
|
||||
lua_pop(gL, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (fastcmp(ptype,"mobj")) // mobjs must write their mobjnum as a header
|
||||
WRITEUINT32(save_p, ((mobj_t *)pointer)->mobjnum);
|
||||
WRITEUINT16(save_p, i);
|
||||
|
|
Loading…
Reference in a new issue