--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-25 16:00:38 -06:00
7 changed files with 35 additions and 30 deletions

View File

@@ -81,15 +81,21 @@ GameObject::~GameObject()
void GameObject::AddToWorld()
{
///- Register the gameobject for guid lookup
if(!IsInWorld()) ObjectAccessor::Instance().AddObject(this);
WorldObject::AddToWorld();
if(!IsInWorld())
{
ObjectAccessor::Instance().AddObject(this);
WorldObject::AddToWorld();
}
}
void GameObject::RemoveFromWorld()
{
///- Remove the gameobject from the accessor
if(IsInWorld()) ObjectAccessor::Instance().RemoveObject(this);
WorldObject::RemoveFromWorld();
if(IsInWorld())
{
ObjectAccessor::Instance().RemoveObject(this);
WorldObject::RemoveFromWorld();
}
}
bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, uint32 go_state, uint32 ArtKit)