diff options
author | megamage <none@none> | 2009-02-26 16:29:55 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-26 16:29:55 -0600 |
commit | ee6418d92a4cccbf63941016e7339ce557144287 (patch) | |
tree | 6e4cce4c8cfa8ae7c23506d313acd8703c786f3b /src/game/Object.cpp | |
parent | c16848a23c25124e87034fd57ded304593fe67f5 (diff) |
*Update active object code.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r-- | src/game/Object.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index f35b392991e..1e0834ecf1f 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1070,11 +1070,30 @@ WorldObject::WorldObject() m_isActive = false; } +void WorldObject::SetWorldObject(bool on) +{ + if(!IsInWorld()) + return; + + if(GetTypeId() == TYPEID_UNIT) + { + if(!((Creature*)this)->isPet()) + GetMap()->SwitchGridContainers((Creature*)this, on); + } + /*else if(GetTypeId() == TYPEID_DYNAMICOBJECT) + { + GetMap()->SwitchGridContainers((DynamicObject*)this, on); + }*/ +} + void WorldObject::setActive( bool on ) { if(m_isActive==on) return; + if(GetTypeId() == TYPEID_PLAYER) + return; + bool world = IsInWorld(); Map* map; |