Add missing write sets

This commit is contained in:
NepDisk 2025-10-07 20:40:12 -04:00
parent a2e2f2cbb2
commit 6417a7f1f2

View file

@ -2940,7 +2940,10 @@ void G_BeginRecording(void)
// player lua vars, always saved even if empty // player lua vars, always saved even if empty
if (demoflags & DF_LUAVARS) if (demoflags & DF_LUAVARS)
{
demobuf.write = true;
LUA_Sync(&demobuf, false, false); LUA_Sync(&demobuf, false, false);
}
memset(&oldcmd,0,sizeof(oldcmd)); memset(&oldcmd,0,sizeof(oldcmd));
memset(&oldghost,0,sizeof(oldghost)); memset(&oldghost,0,sizeof(oldghost));
@ -3793,6 +3796,7 @@ void G_DoPlayDemo(char *defdemoname)
LUA_ClearState(); LUA_ClearState();
// No modeattacking check, DF_LUAVARS won't be present here. // No modeattacking check, DF_LUAVARS won't be present here.
demobuf.write = false;
LUA_Sync(&demobuf, false, G_CompatLevel(0x0002)); LUA_Sync(&demobuf, false, G_CompatLevel(0x0002));
} }