mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-18 15:32:10 +00:00
Make sure it's a waypoint before doing distance calculations
This commit is contained in:
parent
07c7bc05c5
commit
f26c96175d
1 changed files with 3 additions and 3 deletions
|
@ -2576,6 +2576,9 @@ static void K_KartUpdatePosition(player_t *player)
|
||||||
|
|
||||||
mo = (mobj_t *)th;
|
mo = (mobj_t *)th;
|
||||||
|
|
||||||
|
if (mo->type != MT_BOSS3WAYPOINT) // TODO: Change to 'MT_WAYPOINT'?
|
||||||
|
continue;
|
||||||
|
|
||||||
pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x,
|
pmo = P_AproxDistance(P_AproxDistance( mo->x - player->mo->x,
|
||||||
mo->y - player->mo->y),
|
mo->y - player->mo->y),
|
||||||
mo->z - player->mo->z) / FRACUNIT;
|
mo->z - player->mo->z) / FRACUNIT;
|
||||||
|
@ -2583,9 +2586,6 @@ static void K_KartUpdatePosition(player_t *player)
|
||||||
mo->y - players[i].mo->y),
|
mo->y - players[i].mo->y),
|
||||||
mo->z - players[i].mo->z) / FRACUNIT;
|
mo->z - players[i].mo->z) / FRACUNIT;
|
||||||
|
|
||||||
if (mo->type != MT_BOSS3WAYPOINT) // TODO: Change to 'MT_WAYPOINT'?
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (mo->health == player->starpostnum)
|
if (mo->health == player->starpostnum)
|
||||||
{
|
{
|
||||||
player->kartstuff[k_prevcheck] += pmo;
|
player->kartstuff[k_prevcheck] += pmo;
|
||||||
|
|
Loading…
Reference in a new issue