diff options
| author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-26 00:18:31 +0200 |
|---|---|---|
| committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-26 00:18:31 +0200 |
| commit | 37dc13f9a2375c7d6ecccf25f63c607b5bb15928 (patch) | |
| tree | 80faf8762cadc26680281d068daf722c493e222d /src/game-server/trigger.cpp | |
| parent | 95efa0b4a5fddd3384ba7bf7f703b3acf5ab44d3 (diff) | |
| download | manaserv-37dc13f9a2375c7d6ecccf25f63c607b5bb15928.tar.gz manaserv-37dc13f9a2375c7d6ecccf25f63c607b5bb15928.tar.xz manaserv-37dc13f9a2375c7d6ecccf25f63c607b5bb15928.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 19ca351..c4cec2f 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 |
