From 90e553d81a771dcfe5c4418ecbb0f1210c1d661b Mon Sep 17 00:00:00 2001 From: fickleheart Date: Thu, 27 Dec 2018 17:11:16 -0600 Subject: [PATCH] Use waypoint extrainfo to determine lap it works on This can be useful to improve waypoint tracking on sprint maps. --- src/k_kart.c | 8 ++++---- src/p_mobj.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 947f5067..13e7bcca 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -4639,22 +4639,22 @@ static void K_KartUpdatePosition(player_t *player) mo->y - players[i].mo->y), mo->z - players[i].mo->z) / FRACUNIT; - if (mo->health == player->starpostnum) + if (mo->health == player->starpostnum && (!mo->movecount || mo->movecount == player->laps+1)) { player->kartstuff[k_prevcheck] += pmo; ppcd++; } - if (mo->health == (player->starpostnum + 1)) + if (mo->health == (player->starpostnum + 1) && (!mo->movecount || mo->movecount == player->laps+1)) { player->kartstuff[k_nextcheck] += pmo; pncd++; } - if (mo->health == players[i].starpostnum) + if (mo->health == players[i].starpostnum && (!mo->movecount || mo->movecount == players[i].laps+1)) { players[i].kartstuff[k_prevcheck] += imo; ipcd++; } - if (mo->health == (players[i].starpostnum + 1)) + if (mo->health == (players[i].starpostnum + 1) && (!mo->movecount || mo->movecount == players[i].laps+1)) { players[i].kartstuff[k_nextcheck] += imo; incd++; diff --git a/src/p_mobj.c b/src/p_mobj.c index 585bd016..1015abda 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11876,6 +11876,7 @@ ML_NOCLIMB : Direction not controllable else if (i == MT_BOSS3WAYPOINT) // SRB2kart 120217 - Used to store checkpoint num { mobj->health = mthing->angle; + mobj->movecount = mthing->extrainfo; P_SetTarget(&mobj->tracer, waypointcap); P_SetTarget(&waypointcap, mobj); }