Changeset 3056 for code/trunk/src/orxonox/objects
- Timestamp:
- May 25, 2009, 1:56:53 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/objects/gametypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/gametypes/Asteroids.cc
r3033 r3056 44 44 RegisterObject(Asteroids); 45 45 this->firstCheckpointReached_ = false; 46 this->firstTimeSpawned_ = false;47 46 } 48 47 … … 62 61 } 63 62 64 void Asteroids:: spawnPlayer(PlayerInfo* player)63 void Asteroids::pawnKilled(Pawn* victim, Pawn* killer) 65 64 { 66 if ( this->timerIsActive_ && this->firstTimeSpawned_)65 if (victim && victim->getPlayer()) 67 66 { 68 67 this->end(); 69 return;70 68 } 71 72 this->firstTimeSpawned_ = true;73 Gametype::spawnPlayer(player);74 69 } 75 70 -
code/trunk/src/orxonox/objects/gametypes/Asteroids.h
r3033 r3056 51 51 52 52 protected: 53 virtual void spawnPlayer(PlayerInfo* player);53 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0); 54 54 55 55 private: 56 56 bool firstCheckpointReached_; 57 57 bool gameEnded_; 58 bool firstTimeSpawned_;59 60 58 }; 61 59 }
Note: See TracChangeset
for help on using the changeset viewer.