mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Merge branch 'zoom_fix' into 'master'
Zoom tube camera fix Fixed a mistake where I accidentially allowed people to change the player angle whilst in a zoom tube when previously improving them. See merge request !57
This commit is contained in:
commit
3f3a26b7d4
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);
|
||||
|
||||
// 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
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
// 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