Changeset 2902
- Timestamp:
- Apr 6, 2009, 4:25:45 PM (16 years ago)
- Location:
- code/trunk/src/orxonox/objects
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc
r2826 r2902 189 189 return false; 190 190 } 191 192 int TeamDeathmatch::getTeam(PlayerInfo* player) 193 { 194 std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player); 195 if (it_player != this->teamnumbers_.end()) 196 return it_player->second; 197 else 198 return -1; 199 } 191 200 } -
code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.h
r2826 r2902 58 58 virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const; 59 59 bool pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2); 60 int getTeam(PlayerInfo* player); 60 61 61 62 std::map<PlayerInfo*, int> teamnumbers_; -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2896 r2902 198 198 void Pawn::death() 199 199 { 200 this->setHealth(1); 200 201 if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_)) 201 202 { … … 214 215 this->deatheffect(); 215 216 } 216 else217 this->setHealth(1);218 217 } 219 218
Note: See TracChangeset
for help on using the changeset viewer.