Use waypoint extrainfo to determine lap it works on

This can be useful to improve waypoint tracking on sprint maps.
This commit is contained in:
fickleheart 2018-12-27 17:11:16 -06:00
parent a68550600d
commit 90e553d81a
2 changed files with 5 additions and 4 deletions

View file

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

View file

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