Commits

CrimsonDusk  committed e5bbd64

Fixed: A_Wander could trigger an assertion failure if it tried to target a spectator.

  • Participants
  • Parent commits cbab171

Comments (0)

Files changed (1)

File src/p_enemy.cpp

 		// [BB] The else block above possibly selects a spectating player. In that case
 		// don't try to move towards the spectator. This is not exactly the same as
 		// skipping spectators in the above loop, but should work well enough.
-		if ( (pr_newchasedir() & 1 || !P_CheckSight (actor, player))
-			&& player && player->player && ( player->player->bSpectating == false ) )
+		if ( player && (pr_newchasedir() & 1 || !P_CheckSight (actor, player))
+			&& player->player && ( player->player->bSpectating == false ) )
 		{
 			deltax = player->x - actor->x;
 			deltay = player->y - actor->y;