Changeset 8612
- Timestamp:
- May 26, 2011, 5:16:39 PM (14 years ago)
- Location:
- code/branches/presentation/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/libraries/network/synchronisable/Serialise.h
r7284 r8612 84 84 85 85 /** @brief returns the size of the objectID needed to synchronise the pointer */ 86 template <class T> inline uint32_t returnSize( const SmartPtr<T>& variable)86 template <class T> inline uint32_t returnSize( const SmartPtr<T>& ) 87 87 { 88 88 return sizeof(uint32_t); -
code/branches/presentation/src/orxonox/gametypes/LastTeamStanding.cc
r8351 r8612 55 55 this->setHUDTemplate("lastTeamStandingHUD"); 56 56 } 57 57 58 58 LastTeamStanding::~LastTeamStanding() 59 59 { 60 } 60 } 61 61 62 62 void LastTeamStanding::playerEntered(PlayerInfo* player) … … 69 69 else 70 70 playerLives_[player]=getMinLives();//new players only get minimum of lives */ 71 71 72 72 this->timeToAct_[player] = timeRemaining; 73 73 this->playerDelayTime_[player] = respawnDelay; 74 74 this->inGame_[player] = true; 75 75 unsigned int team = getTeam(player); 76 if( team < 0|| team > teams_) // make sure getTeam returns a regular value76 if(team >= eachTeamsPlayers.size()) // make sure getTeam returns a regular value 77 77 return; 78 78 if(this->eachTeamsPlayers[team]==0) //if a player is the first in his group, a new team is alive … … 91 91 this->inGame_.erase(player); 92 92 unsigned int team = getTeam(player); 93 if( team < 0|| team > teams_) // make sure getTeam returns a regular value93 if(team >= eachTeamsPlayers.size()) // make sure getTeam returns a regular value 94 94 return valid_player; 95 95 this->eachTeamsPlayers[team]--; // a player left the team … … 107 107 bool allow = TeamDeathmatch::allowPawnDeath(victim, originator); 108 108 if(!allow) {return allow;} 109 109 110 110 playerLives_[victim->getPlayer()] = playerLives_[victim->getPlayer()] - 1; //player lost a live 111 111 this->inGame_[victim->getPlayer()] = false; //if player dies, he isn't allowed to respawn immediately … … 113 113 { 114 114 unsigned int team = getTeam(victim->getPlayer()); 115 if(team < 0|| team > teams_) // make sure getTeam returns a regular value115 if(team >= eachTeamsPlayers.size()) // make sure getTeam returns a regular value 116 116 return allow; 117 117 this->eachTeamsPlayers[team]--; … … 140 140 const std::string& message = ""; // resets Camper-Warning-message 141 141 this->gtinfo_->sendFadingMessage(message,it->first->getClientID()); 142 } 142 } 143 143 } 144 144 return allow; … … 163 163 return; 164 164 TeamDeathmatch::playerStartsControllingPawn(player,pawn); 165 165 166 166 this->timeToAct_[player] = timeRemaining + 3.0f + respawnDelay;//reset timer 167 167 this->playerDelayTime_[player] = respawnDelay; 168 168 169 169 std::map<PlayerInfo*, Player>::iterator it = this->players_.find(player); 170 170 if (it != this->players_.end()) … … 174 174 const std::string& message = ""; // resets Camper-Warning-message 175 175 this->gtinfo_->sendFadingMessage(message,it->first->getClientID()); 176 } 176 } 177 177 } 178 178 … … 187 187 } 188 188 for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it) 189 { 189 { 190 190 if (playerGetLives(it->first) <= 0)//Players without lives shouldn't be affected by time. 191 continue; 191 continue; 192 192 it->second -= dt;//Decreases punishment time. 193 if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up. 193 if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up. 194 194 { 195 195 playerDelayTime_[it->first] -= dt; … … 309 309 return 0; 310 310 } 311 311 312 312 void LastTeamStanding::setConfigValues() 313 313 { -
code/branches/presentation/src/orxonox/weaponsystem/Munition.cc
r7896 r8612 253 253 bool Munition::canAddMunition(unsigned int amount) const 254 254 { 255 // TODO: 'amount' is not used 256 255 257 if (!this->bAllowMunitionRefilling_) 256 258 return false; … … 334 336 bool Munition::canAddMagazines(unsigned int amount) const 335 337 { 338 // TODO: 'amount' is not used 339 336 340 if (this->bStackMunition_) 337 341 // If we stack munition, we can always add new magazines because they contribute directly to the munition
Note: See TracChangeset
for help on using the changeset viewer.