From 15001ce9f1e69c694f9d47eeac94462b62cb4253 Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Thu, 31 Jan 2008 23:20:39 +0000 Subject: [PATCH] get_nearest_player won't return dying or dead players SVN-Revision: 5305 --- src/badguy/badguy.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index 6932362f9..cddb7ac0c 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -497,6 +497,7 @@ BadGuy::get_nearest_player() std::vector players = Sector::current()->get_players(); for (std::vector::iterator playerIter = players.begin(); playerIter != players.end(); ++playerIter) { Player* player = *playerIter; + if (player->is_dying() || player->is_dead()) continue; return player; } -- 2.11.0