Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 4, 2016, 12:07:42 AM (8 years ago)
Author:
landauf
Message:

fixed another situation where a timer may keep existing after the level was unloaded.
there is, however, yet another bug in this piece of code (marked with a TODO): a spaceship can be destroyed before the timer is executed which leads to a crash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/orxonox/gametypes/Dynamicmatch.h

    r10624 r11032  
    3333
    3434#include <map>
     35#include <set>
    3536#include <vector>
    3637
     
    4546        public:
    4647            Dynamicmatch(Context* context);
    47             virtual ~Dynamicmatch() {}
     48            virtual ~Dynamicmatch();
    4849
    4950            bool notEnoughPigs;
     
    7778            virtual void rewardPig();
    7879            void grantPigBoost(SpaceShip* spaceship); // Grant the piggy a boost.
    79             void resetSpeedFactor(SpaceShip* spaceship);
     80            void resetSpeedFactor(SpaceShip* spaceship, Timer* timer);
    8081            void tick (float dt);// used to end the game
    8182            SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
     
    8889            std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
    8990            std::vector<ColourValue> partyColours_; //aus TeamDeathmatch
     91            std::set<Timer*> piggyTimers_;
    9092            unsigned int numberOf[3]; //array to count number of chasers, pigs, killers
    9193            float pointsPerTime;
Note: See TracChangeset for help on using the changeset viewer.