From 2188391d421243a2d76bb532bb7e01d557d788e3 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 4 May 2020 20:37:52 -0400 Subject: [PATCH] add botvars to resynch packet --- src/d_clisrv.c | 12 ++++++++++++ src/d_clisrv.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 60ad406cf..45627d3a2 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -646,6 +646,12 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i) rsp->splitscreenindex = players[i].splitscreenindex; + rsp->bot = players[i].bot; + rsp->bot_difficulty = players[i].botvars.difficulty; + rsp->bot_itemdelay = players[i].botvars.itemdelay; + rsp->bot_itemconfirm = players[i].botvars.itemconfirm; + rsp->bot_lastturn = players[i].botvars.lastturn; + rsp->hasmo = false; //Transfer important mo information if the player has a body. //This lets us resync players even if they are dead. @@ -769,6 +775,12 @@ static void resynch_read_player(resynch_pak *rsp) players[i].splitscreenindex = rsp->splitscreenindex; + players[i].bot = rsp->bot; + players[i].botvars.difficulty = rsp->bot_difficulty; + players[i].botvars.itemdelay = rsp->bot_itemdelay; + players[i].botvars.itemconfirm = rsp->bot_itemconfirm; + players[i].botvars.lastturn = rsp->bot_lastturn; + //We get a packet for each player in game. if (!playeringame[i]) return; diff --git a/src/d_clisrv.h b/src/d_clisrv.h index d39babd82..6e0a88c6a 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -280,6 +280,12 @@ typedef struct UINT8 splitscreenindex; + boolean bot; + UINT8 bot_difficulty; + tic_t bot_itemdelay; + tic_t bot_itemconfirm; + INT16 bot_lastturn; + //player->mo stuff UINT8 hasmo; // Boolean