mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +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)
|
if (an > ANGLE_90 && an < ANGLE_270)
|
||||||
continue; // behind back
|
continue; // behind back
|
||||||
|
|
||||||
player->mo->angle = R_PointToAngle2(player->mo->x, player->mo->y, mo->x, mo->y);
|
|
||||||
|
|
||||||
if (!P_CheckSight(player->mo, mo))
|
if (!P_CheckSight(player->mo, mo))
|
||||||
continue; // out of sight
|
continue; // out of sight
|
||||||
|
|
||||||
|
@ -7524,6 +7522,7 @@ boolean P_LookForEnemies(player_t *player)
|
||||||
{
|
{
|
||||||
// Found a target monster
|
// Found a target monster
|
||||||
P_SetTarget(&player->mo->target, P_SetTarget(&player->mo->tracer, closestmo));
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue