Ignore:
Timestamp:
Jul 23, 2011, 11:14:36 PM (8 years ago)
Author:
sam
Message:

core: Dict::RemoveSlot can now directly remove an Entity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dict.cpp

    r758 r789  
    135135}
    136136
     137void Dict::RemoveSlot(Entity *entity)
     138{
     139    for (int id = 0; id < data->maxid; id++)
     140        if (data->entities[id] == entity)
     141        {
     142            RemoveSlot(id);
     143            return;
     144        }
     145
     146#if !LOL_RELEASE
     147    Log::Error("removing unregistered entity %p\n", entity);
     148#endif
     149}
    137150
    138151void Dict::SetEntity(int id, Entity *entity)
Note: See TracChangeset for help on using the changeset viewer.