Changeset 2865


Ignore:
Timestamp:
Sep 4, 2013, 6:35:52 PM (6 years ago)
Author:
sam
Message:

core: fix grave logic bugs in the entity ticker.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ticker.cpp

    r2817 r2865  
    122122         * very fast since the last entry in autolist is the last
    123123         * registered entity. */
    124         for (int i = data->m_autolist.Count(); --i; )
     124        for (int i = data->m_autolist.Count(); i--; )
    125125        {
    126126            if (data->m_autolist[i] == entity)
     
    228228        {
    229229            Entity *e = data->m_list[g][i];
    230             Log::Debug("  \\-- %s (m_ref %i, destroy %i)\n", e->GetName(), e->m_ref, e->m_destroy);
     230            Log::Debug("  \\-- [%p] %s (m_ref %i, destroy %i)\n",
     231                       e, e->GetName(), e->m_ref, e->m_destroy);
    231232        }
    232233    }
     
    299300    /* Garbage collect objects that can be destroyed. We can do this
    300301     * before inserting awaiting objects, because only objects already
    301      * inthe tick lists can be marked for destruction. */
     302     * in the tick lists can be marked for destruction. */
    302303    for (int g = 0; g < Entity::ALLGROUP_END; ++g)
    303304    {
    304         for (int i = 0; i < data->m_list[g].Count(); ++i)
     305        for (int i = data->m_list[g].Count(); i--; )
    305306        {
    306307            Entity *e = data->m_list[g][i];
Note: See TracChangeset for help on using the changeset viewer.