From 9b10073cabe5e41c3f4593c8d784705f030803e9 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 15 Sep 2025 17:26:48 +0200 Subject: [PATCH] revert demo ghosttic hitlist resynch double free hack now that we dont reload the map anymore during gamestate reload --- src/g_demo.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/g_demo.c b/src/g_demo.c index 389677e24..f7e4e2c93 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -700,13 +700,6 @@ void G_WriteAllGhostTics(void) if (multiplayer && ((counter % cv_netdemosyncquality.value) != 0)) // Only write 1 in this many ghost datas per tic to cut down on multiplayer replay size. continue; - if (((ghostext[i].flags && (ghostext[i].flags & EZT_HIT)) || ghostext[i].hits) - && !ghostext[i].hitlist) // hitlist might be freed during resynch, beware PU_LEVEL! - { - ghostext[i].hits = 0; - continue; - } - CHECKSPACE(1); WRITEUINT8(demobuf.p, i); @@ -914,7 +907,9 @@ void G_WriteGhostTic(mobj_t *ghost, INT32 playernum) P_SetTarget(ghostext[playernum].hitlist+i, NULL); } + Z_Free(ghostext[playernum].hitlist); ghostext[playernum].hits = 0; + ghostext[playernum].hitlist = NULL; } if (ghostext[playernum].flags & EZT_SPRITE)