add botvars to resynch packet

This commit is contained in:
Sally Coolatta 2020-05-04 20:37:52 -04:00
parent 766c6da005
commit 2188391d42
2 changed files with 18 additions and 0 deletions

View file

@ -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;

View file

@ -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