summaryrefslogtreecommitdiff
path: root/src/game-server/trigger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/trigger.cpp')
-rw-r--r--src/game-server/trigger.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game-server/trigger.cpp b/src/game-server/trigger.cpp
index 19ca3512..c4cec2f4 100644
--- a/src/game-server/trigger.cpp
+++ b/src/game-server/trigger.cpp
@@ -52,8 +52,9 @@ void TriggerArea::update()
std::set<Actor*> insideNow;
for (BeingIterator i(getMap()->getInsideRectangleIterator(mZone)); i; ++i)
{
- //skip garbage
- if (!(*i) || (*i)->getPublicID() == 0) continue;
+ // Don't deal with unitialized actors.
+ if (!(*i) || !(*i)->isPublicIdValid())
+ continue;
// The BeingIterator returns the mapZones in touch with the rectangle
// area. On the other hand, the beings contained in the map zones