From 74c37ed06ccbb96acf6525cad4fd18142956d541 Mon Sep 17 00:00:00 2001 From: fickleheart Date: Sat, 12 Jan 2019 02:06:40 -0600 Subject: [PATCH] Record all players' ticcmds in multiplayer --- src/p_tick.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/p_tick.c b/src/p_tick.c index b46b248b..e1262a77 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -599,9 +599,26 @@ void P_Ticker(boolean run) if (run) { if (demorecording) - G_WriteDemoTiccmd(&players[consoleplayer].cmd, 0); + { + if (!multiplayer) { + G_WriteDemoTiccmd(&players[consoleplayer].cmd, 0); + } else { + for (i = 0; i < MAXPLAYERS; i++) + if (playeringame[i] && !players[i].spectator) + G_WriteDemoTiccmd(&players[i].cmd, i); + } + } if (demoplayback) + { + + if (!multiplayer) { G_ReadDemoTiccmd(&players[consoleplayer].cmd, 0); + } else { + for (i = 0; i < MAXPLAYERS; i++) + if (playeringame[i] && !players[i].spectator) + G_ReadDemoTiccmd(&players[i].cmd, i); + } + } for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i] && players[i].mo && !P_MobjWasRemoved(players[i].mo))