1
This commit is contained in:
parent
55ed1af4b6
commit
c038e93e75
@ -1285,9 +1285,12 @@ void Room::TraverseAliveHumanList(std::function<bool (Human*)> func)
|
|||||||
void Room::TraverseCreatureList(std::function<bool (Creature*)> func)
|
void Room::TraverseCreatureList(std::function<bool (Creature*)> func)
|
||||||
{
|
{
|
||||||
for (auto& pair : moveable_hash_) {
|
for (auto& pair : moveable_hash_) {
|
||||||
if (pair.second && !pair.second->IsOb() && pair.second->IsCreature(this)) {
|
if (pair.second && pair.second->IsCreature(this)) {
|
||||||
if (!func((Creature*)pair.second)) {
|
Creature* c = (Creature*)pair.second;
|
||||||
break;
|
if (!c->IsOb()) {
|
||||||
|
if (!func(c)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user