Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2007, 5:04:07 AM (18 years ago)
Author:
landauf
Message:
  • added very bad collision detection (presentation hack :D)
  • added explosions
  • fixed bug in ParticleInterface (it tried to delete SceneManager)

AND:

  • fixed one of the most amazing bugs ever! (the game crashed when I deleted an object through a timer-function. because the timer-functions is called by an iterator, the iterator indirectly delted its object. by overloading the (it++) operator, i was able to solve this problem)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/Timer.h

    r640 r646  
    136136            {
    137137                // Iterate through all Timers
    138                 for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; ++it)
     138                for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; )
    139139                {
    140140                    if (it->isActive())
     
    151151                                it->stopTimer(); // Stop the timer if we don't want to loop
    152152
    153                             it->run();
     153                            (it++)->run();
    154154                        }
     155                        else
     156                            ++it;
    155157                    }
     158                    else
     159                        ++it;
    156160                }
    157161
Note: See TracChangeset for help on using the changeset viewer.