From 06eca5fbb5bc0aa27e992269152e59812c9b0e10 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Fri, 17 Nov 2017 17:36:04 -0500 Subject: [PATCH] Minor things - crash fix - commented out player 2 spawning with balloons - double checked battle exiting is 10 sec --- src/k_kart.c | 11 ++--------- src/p_mobj.c | 20 +++++++------------- src/p_user.c | 2 ++ 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 0cd2a1ea..9c5d60c7 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -2597,16 +2597,9 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue) static void K_KartDrift(player_t *player, boolean onground) { - fixed_t dsone; - fixed_t dstwo; - // IF YOU CHANGE THESE: MAKE SURE YOU UPDATE THE SAME VALUES IN p_mobjc, "case MT_DRIFT:" - if (gametype != GT_RACE && player->kartstuff[k_balloon] <= 0) - dsone = 26*4 + 2; - else - dsone = 26*4 + player->kartspeed*2 + (9 - player->kartweight); - - dstwo = dsone*2; + fixed_t dsone = 26*4 + player->kartspeed*2 + (9 - player->kartweight); + fixed_t dstwo = dsone*2; // Drifting is actually straffing + automatic turning. // Holding the Jump button will enable drifting. diff --git a/src/p_mobj.c b/src/p_mobj.c index a32f36e1..8c0b394b 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6459,15 +6459,8 @@ void P_MobjThinker(mobj_t *mobj) //{ SRB2kart mobs case MT_DRIFT: { - fixed_t dsone; - fixed_t dstwo; - - if (gametype != GT_RACE && mobj->target->player->kartstuff[k_balloon] <= 0) - dsone = 26*4 + 2 + (9 - mobj->target->player->kartweight); - else - dsone = 26*4 + mobj->target->player->kartspeed*2 + (9 - mobj->target->player->kartweight); - - dstwo = dsone*2; + fixed_t dsone = 26*4 + mobj->target->player->kartspeed*2 + (9 - mobj->target->player->kartweight); + fixed_t dstwo = dsone*2; if ((mobj->target && mobj->target->player && mobj->target->player->mo && mobj->target->player->health > 0 && !mobj->target->player->spectator) && (mobj->type == MT_DRIFT && mobj->target->player->kartstuff[k_driftcharge] >= dsone)) @@ -9449,7 +9442,7 @@ void P_SpawnPlayer(INT32 playernum) if (gametype != GT_RACE) { - INT32 i; + /*INT32 i; INT32 pcount = 0; for (i = 0; i < MAXPLAYERS; i++) @@ -9459,17 +9452,18 @@ void P_SpawnPlayer(INT32 playernum) if (players[i].jointime > 0) continue; pcount++; - } + }*/ - if (p->kartstuff[k_balloon] > 0 || leveltime < 1 || pcount <= 1) // srb2kart + if (p->kartstuff[k_balloon] > 0 || leveltime < 1/* || pcount <= 1*/) // srb2kart { + INT32 i; angle_t newangle; angle_t diff; fixed_t newx; fixed_t newy; mobj_t *mo; - if (leveltime < 1 || pcount <= 1) // Start of the map? + if (leveltime < 1 /*|| pcount <= 1*/) // Start of the map? p->kartstuff[k_balloon] = cv_kartballoons.value; // Reset those balloons! if (p->kartstuff[k_balloon] <= 1) diff --git a/src/p_user.c b/src/p_user.c index 5e2d1256..583a0547 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1650,6 +1650,8 @@ void P_DoPlayerExit(player_t *player) if (P_CheckRacers()) player->exiting = (14*TICRATE)/5 + 1; } + else if (gametype != GT_RACE) + player->exiting = 10*TICRATE + 2; // Accidental death safeguard??? else player->exiting = (14*TICRATE)/5 + 2; // Accidental death safeguard???