Show
Ignore:
Timestamp:
11/19/08 13:38:01 (17 years ago)
Author:
yumileroy
Message:

[svn] * Allow WorldObjects? to keep the grid active, and prevent it from being unloaded. This can be done through calling WorldObject::setActive(bool) from the scripting library. Note that entire instances are still unloaded if no player is present on that map to save resources. This behavior can be changed if the need arises.

Original author: w12x
Date: 2008-10-27 08:41:55-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/ObjectAccessor.h

    r102 r120  
    194194        Corpse* ConvertCorpseForPlayer(uint64 player_guid); 
    195195 
    196         bool PlayersNearGrid(uint32 x,uint32 y,uint32 m_id,uint32 i_id) const; 
     196        bool ActiveObjectsNearGrid(uint32 x,uint32 y,uint32 m_id,uint32 i_id) const; 
    197197 
    198198        static void UpdateObject(Object* obj, Player* exceptPlayer); 
     
    201201        static void UpdateObjectVisibility(WorldObject* obj); 
    202202        static void UpdateVisibilityForPlayer(Player* player); 
     203 
     204        void AddActiveObject(WorldObject*); 
     205        void RemoveActiveObject(WorldObject*); 
    203206    private: 
    204207        struct WorldObjectChangeAccumulator 
     
    221224        void _update(void); 
    222225        std::set<Object *> i_objects; 
     226        std::set<WorldObject *> i_activeobjects; 
    223227        LockType i_playerGuard; 
    224228        LockType i_updateGuard;