mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Correcting slip-up I made when originally improving zoom tubes.
This commit is contained in:
parent
eab2df5627
commit
c833497d39
1 changed files with 11 additions and 7 deletions
18
src/p_user.c
18
src/p_user.c
|
@ -7159,13 +7159,6 @@ static void P_DoZoomTube(player_t *player)
|
||||||
P_SetTarget(&player->mo->tracer, waypoint);
|
P_SetTarget(&player->mo->tracer, waypoint);
|
||||||
|
|
||||||
// calculate MOMX/MOMY/MOMZ for next waypoint
|
// calculate MOMX/MOMY/MOMZ for next waypoint
|
||||||
// change angle
|
|
||||||
player->mo->angle = R_PointToAngle2(player->mo->x, player->mo->y, player->mo->tracer->x, player->mo->tracer->y);
|
|
||||||
|
|
||||||
if (player == &players[consoleplayer])
|
|
||||||
localangle = player->mo->angle;
|
|
||||||
else if (player == &players[secondarydisplayplayer])
|
|
||||||
localangle2 = player->mo->angle;
|
|
||||||
|
|
||||||
// change slope
|
// change slope
|
||||||
dist = P_AproxDistance(P_AproxDistance(player->mo->tracer->x - player->mo->x, player->mo->tracer->y - player->mo->y), player->mo->tracer->z - player->mo->z);
|
dist = P_AproxDistance(P_AproxDistance(player->mo->tracer->x - player->mo->x, player->mo->tracer->y - player->mo->y), player->mo->tracer->z - player->mo->z);
|
||||||
|
@ -7185,6 +7178,17 @@ static void P_DoZoomTube(player_t *player)
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Next waypoint not found, releasing from track...\n");
|
CONS_Debug(DBG_GAMELOGIC, "Next waypoint not found, releasing from track...\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// change angle
|
||||||
|
if (player->mo->tracer)
|
||||||
|
{
|
||||||
|
player->mo->angle = R_PointToAngle2(player->mo->x, player->mo->y, player->mo->tracer->x, player->mo->tracer->y);
|
||||||
|
|
||||||
|
if (player == &players[consoleplayer])
|
||||||
|
localangle = player->mo->angle;
|
||||||
|
else if (player == &players[secondarydisplayplayer])
|
||||||
|
localangle2 = player->mo->angle;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue