From 1619efec82226a1aa4a27bc4a18d87f2c5605ffd Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 1 Mar 2021 01:13:03 -0500 Subject: [PATCH] Make it past kart & mixer files --- src/d_clisrv.c | 15 +++++++++++++++ src/d_clisrv.h | 6 ++++++ src/k_bot.c | 7 +++++-- src/p_setup.c | 2 +- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 5aa656fee..e1a480916 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -134,6 +134,9 @@ static INT16 consistancy[TICQUEUE]; static UINT8 player_joining = false; UINT8 hu_redownloadinggamestate = 0; +// kart, true when a player is connecting or disconnecting so that the gameplay has stopped in its tracks +boolean hu_stopped = false; + UINT8 adminpassmd5[16]; boolean adminpasswordset = false; @@ -5317,8 +5320,14 @@ void TryRunTics(tic_t realtics) } #endif + if (neededtic > gametic) + { + hu_stopped = false; + } + if (player_joining) { + hu_stopped = true; return; } @@ -5332,6 +5341,7 @@ void TryRunTics(tic_t realtics) D_StartTitle(); } else + { // run the count * tics while (neededtic > gametic) { @@ -5350,6 +5360,11 @@ void TryRunTics(tic_t realtics) if (client && gamestate == GS_LEVEL && leveltime > 3 && neededtic <= gametic + cv_netticbuffer.value) break; } + } + } + else + { + hu_stopped = true; } } diff --git a/src/d_clisrv.h b/src/d_clisrv.h index 563e9efdc..f8bc7f3c0 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -524,6 +524,12 @@ extern UINT8 hu_redownloadinggamestate; extern UINT8 adminpassmd5[16]; extern boolean adminpasswordset; +// +// SRB2Kart +// + +extern boolean hu_stopped; + typedef struct rewind_s { UINT8 savebuffer[(768*1024)]; tic_t leveltime; diff --git a/src/k_bot.c b/src/k_bot.c index 126e4cee9..1d7a9bb7b 100644 --- a/src/k_bot.c +++ b/src/k_bot.c @@ -792,6 +792,7 @@ static INT16 K_FindBotController(mobj_t *mo) msecnode_t *node; ffloor_t *rover; INT16 lineNum = -1; + mtag_t tag; I_Assert(mo != NULL); I_Assert(!P_MobjWasRemoved(mo)); @@ -803,7 +804,8 @@ static INT16 K_FindBotController(mobj_t *mo) continue; } - lineNum = P_FindSpecialLineFromTag(2004, node->m_sector->tag, -1); + tag = Tag_FGet(&node->m_sector->tags); + lineNum = P_FindSpecialLineFromTag(2004, tag, -1); // todo: needs to not use P_FindSpecialLineFromTag if (lineNum != -1) { @@ -825,7 +827,8 @@ static INT16 K_FindBotController(mobj_t *mo) } rs = §ors[rover->secnum]; - lineNum = P_FindSpecialLineFromTag(2004, rs->tag, -1); + tag = Tag_FGet(&rs->tags); + lineNum = P_FindSpecialLineFromTag(2004, tag, -1); if (lineNum != -1) { diff --git a/src/p_setup.c b/src/p_setup.c index 56a15eb46..8ee160c11 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3217,7 +3217,7 @@ static void P_ConvertBinaryMap(void) break; case 2001: // MT_WAYPOINT { - INT32 firstline = P_FindSpecialLineFromTag(2000, mapthings[i].angle, -1); + INT32 firstline = Tag_FindLineSpecial(2000, (INT16)mapthings[i].angle); Tag_FSet(&mapthings[i].tags, mapthings[i].angle); mapthings[i].args[0] = mapthings[i].z;