diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-26 06:18:31 +0800 |
---|---|---|
committer | Yohann Ferreira <yohann.ferreira@orange.fr> | 2011-09-28 22:36:43 +0800 |
commit | da782617397773fb2f29a4021fe73a80e38f62dd (patch) | |
tree | 10d13f9e357141c237c6d22760479fb8a7867d41 /src/game-server/trigger.cpp | |
parent | 7ddeb3c927b81474548bbc13ebcd00eb5688c51a (diff) | |
download | manaserv-da782617397773fb2f29a4021fe73a80e38f62dd.tar.gz manaserv-da782617397773fb2f29a4021fe73a80e38f62dd.tar.bz2 manaserv-da782617397773fb2f29a4021fe73a80e38f62dd.tar.xz manaserv-da782617397773fb2f29a4021fe73a80e38f62dd.zip |
Added a bit more precision on the conditions used in the TriggerArea::update() function.
Diffstat (limited to 'src/game-server/trigger.cpp')
-rw-r--r-- | src/game-server/trigger.cpp | 5 |
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 |