Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6408


Ignore:
Timestamp:
Dec 24, 2009, 8:49:57 AM (15 years ago)
Author:
rgrieder
Message:

Main loop optimisations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/gamestates/GSRoot.cc

    r6387 r6408  
    9191    {
    9292        for (ObjectList<Timer>::iterator it = ObjectList<Timer>::begin(); it; )
    93             (it++)->tick(time);
     93        {
     94            Timer* object = *it;
     95            ++it;
     96            object->tick(time);
     97        }
    9498
    9599        /*** HACK *** HACK ***/
     
    101105            leveldt = 0.0f;
    102106        }
     107        float realdt = leveldt * TimeFactorListener::getTimeFactor();
    103108        for (ObjectList<Tickable>::iterator it = ObjectList<Tickable>::begin(); it; )
    104             (it++)->tick(leveldt * TimeFactorListener::getTimeFactor());
     109        {
     110            Tickable* object = *it;
     111            ++it;
     112            object->tick(realdt);
     113        }
    105114        /*** HACK *** HACK ***/
    106115    }
Note: See TracChangeset for help on using the changeset viewer.