diff options
author | megamage <none@none> | 2009-03-03 19:07:52 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-03 19:07:52 -0600 |
commit | e3eba9331ee21011049c6ef4cdaa101144ed9c47 (patch) | |
tree | 399c425d64e011019c43758269807681d1567cf7 /src/game/Unit.cpp | |
parent | aca0f0b497c76e9d4e96f55793417f614d7845ca (diff) |
*Fix a crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index cb718546146..c3073251f34 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8526,19 +8526,23 @@ void Unit::SetCharm(Unit* pet) void Unit::AddPlayerToVision(Player* plr) { - setActive(true); if(m_sharedVision.empty()) + { + setActive(true); SetWorldObject(true); + } m_sharedVision.push_back(plr); plr->SetFarsightTarget(this); } void Unit::RemovePlayerFromVision(Player* plr) { - setActive(false); m_sharedVision.remove(plr); if(m_sharedVision.empty()) + { + setActive(false); SetWorldObject(false); + } plr->ClearFarsight(); } |