mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 12:50:44 +00:00
P_LookForEnemies should not change the player's angle until the target has been decided
This fixes a quirk with Shadow with chaos control sometimes throwing the player in the wrong direction
This commit is contained in:
parent
d53801c85c
commit
b8cc36dfd1
1 changed files with 1 additions and 2 deletions
|
@ -7512,8 +7512,6 @@ boolean P_LookForEnemies(player_t *player)
|
|||
if (an > ANGLE_90 && an < ANGLE_270)
|
||||
continue; // behind back
|
||||
|
||||
player->mo->angle = R_PointToAngle2(player->mo->x, player->mo->y, mo->x, mo->y);
|
||||
|
||||
if (!P_CheckSight(player->mo, mo))
|
||||
continue; // out of sight
|
||||
|
||||
|
@ -7524,6 +7522,7 @@ boolean P_LookForEnemies(player_t *player)
|
|||
{
|
||||
// Found a target monster
|
||||
P_SetTarget(&player->mo->target, P_SetTarget(&player->mo->tracer, closestmo));
|
||||
player->mo->angle = R_PointToAngle2(player->mo->x, player->mo->y, closestmo->x, closestmo->y);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue