projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99c2090
)
get_nearest_player won't return dying or dead players
author
Christoph Sommer
<mail@christoph-sommer.de>
Thu, 31 Jan 2008 23:20:39 +0000
(23:20 +0000)
committer
Christoph Sommer
<mail@christoph-sommer.de>
Thu, 31 Jan 2008 23:20:39 +0000
(23:20 +0000)
SVN-Revision: 5305
src/badguy/badguy.cpp
patch
|
blob
|
history
diff --git
a/src/badguy/badguy.cpp
b/src/badguy/badguy.cpp
index
6932362
..
cddb7ac
100644
(file)
--- a/
src/badguy/badguy.cpp
+++ b/
src/badguy/badguy.cpp
@@
-497,6
+497,7
@@
BadGuy::get_nearest_player()
std::vector<Player*> players = Sector::current()->get_players();
for (std::vector<Player*>::iterator playerIter = players.begin(); playerIter != players.end(); ++playerIter) {
Player* player = *playerIter;
+ if (player->is_dying() || player->is_dead()) continue;
return player;
}