mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-29 20:50:38 +00:00
Don't save Luavars in record attack, especially not for ghosts
This commit is contained in:
parent
d0b4f8765d
commit
d949a47a70
1 changed files with 7 additions and 3 deletions
10
src/g_game.c
10
src/g_game.c
|
@ -6368,7 +6368,9 @@ void G_BeginRecording(void)
|
||||||
demoflags |= DF_ENCORE;
|
demoflags |= DF_ENCORE;
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
demoflags |= DF_LUAVARS;
|
if (!modeattacking) // Ghosts don't read luavars, and you shouldn't ever need to save Lua in replays, you doof!
|
||||||
|
// SERIOUSLY THOUGH WHY WOULD YOU LOAD HOSTMOD AND RECORD A GHOST WITH IT !????
|
||||||
|
demoflags |= DF_LUAVARS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Setup header.
|
// Setup header.
|
||||||
|
@ -6474,8 +6476,9 @@ void G_BeginRecording(void)
|
||||||
WRITEUINT8(demo_p, 0xFF); // Denote the end of the player listing
|
WRITEUINT8(demo_p, 0xFF); // Denote the end of the player listing
|
||||||
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
// player lua vars, always saved even if empty
|
// player lua vars, always saved even if empty... Unless it's record attack.
|
||||||
LUA_ArchiveDemo();
|
if (!modeattacking)
|
||||||
|
LUA_ArchiveDemo();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
memset(&oldcmd,0,sizeof(oldcmd));
|
memset(&oldcmd,0,sizeof(oldcmd));
|
||||||
|
@ -7543,6 +7546,7 @@ void G_DoPlayDemo(char *defdemoname)
|
||||||
if (!gL) // No Lua state! ...I guess we'll just start one...
|
if (!gL) // No Lua state! ...I guess we'll just start one...
|
||||||
LUA_ClearState();
|
LUA_ClearState();
|
||||||
|
|
||||||
|
// No modeattacking check, DF_LUAVARS won't be present here.
|
||||||
LUA_UnArchiveDemo();
|
LUA_UnArchiveDemo();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue