Changeset 7037 in orxonox.OLD for trunk/src/util
- Timestamp:
- Feb 6, 2006, 12:05:23 AM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/multiplayer_team_deathmatch.cc
r7035 r7037 35 35 this->setClassID(CL_MULTIPLAYER_TEAM_DEATHMATCH, "MultiplayerTeamDeathmatch"); 36 36 37 this->bLocalPlayerDead = false; 38 this->deathTimeout = 10.0f; // 5 seconds 39 37 40 if( root != NULL) 38 41 this->loadParams(root); … … 50 53 { 51 54 GameRules::loadParams(root); 55 56 LoadParam(root, "death-penalty-timeout", this, MultiplayerTeamDeathmatch, setDeathPenaltyTimeout) 57 .describe("sets the time in seconds a player has to wait for respawn"); 58 59 LoadParam(root, "max-kills", this, MultiplayerTeamDeathmatch, setMaxKills) 60 .describe("sets the maximal kills for winning condition"); 52 61 } 53 62 … … 74 83 */ 75 84 void MultiplayerTeamDeathmatch::tick(float dt) 76 {} 85 { 86 87 } 77 88 78 89 -
trunk/src/util/multiplayer_team_deathmatch.h
r7035 r7037 2 2 /*! 3 3 * @file multiplayer_team_deathmatch.h 4 * Defines game rules for this game 4 * Defines game rules for team deathmatch games 5 * 6 * currently there are only two teams supported 5 7 */ 6 8 … … 33 35 void draw(); 34 36 37 inline void setDeathPenaltyTimeout(float time) { this->deathTimeout = time; } 38 inline void setMaxKills(int kills) { this->maxKills = kills; } 35 39 36 40 protected: 37 41 virtual void checkGameRules(); 42 43 private: 44 bool bLocalPlayerDead; //!< true if the local player is dead 45 float deathTimeout; //!< timeout a player cannot play if he/she dies 46 int maxKills; //!< max kills for winning condition 47 48 int teamAKills; //!< kills of team A 49 int teamBKills; //!< kills of team B 38 50 }; 39 51
Note: See TracChangeset
for help on using the changeset viewer.