Changeset 7044 in orxonox.OLD for trunk/src/util
- Timestamp:
- Feb 6, 2006, 2:09:01 AM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/game_rules.h
r7035 r7044 26 26 27 27 28 virtual void onPlayerSpawn( Player* player) {}29 virtual void onPlayerDeath( Player* player) {}28 virtual void onPlayerSpawn() {} 29 virtual void onPlayerDeath() {} 30 30 31 31 -
trunk/src/util/multiplayer_team_deathmatch.cc
r7040 r7044 23 23 #include "state.h" 24 24 25 #include "player.h" 26 #include "playable.h" 27 25 28 26 29 using namespace std; … … 42 45 43 46 this->deathScreen = new Billboard(); 44 this->deathScreen->setSize(State::getResX() , State::getResY());47 this->deathScreen->setSize(State::getResX()/4.0, State::getResY()/4.0); 45 48 this->deathScreen->setAbsCoor2D(State::getResX()/2.0f, State::getResY()/2.0f); 46 //this->deathScreen->setVisibility(false); 49 this->deathScreen->setVisibility(false); 50 51 this->localPlayer = State::getPlayer(); 47 52 48 53 if( root != NULL) … … 54 59 */ 55 60 MultiplayerTeamDeathmatch::~MultiplayerTeamDeathmatch() 56 {} 61 { 62 if( this->deathScreen) 63 delete this->deathScreen; 64 } 57 65 58 66 … … 87 95 * @param player the spawned player 88 96 */ 89 void MultiplayerTeamDeathmatch::onPlayerSpawn( Player* player)97 void MultiplayerTeamDeathmatch::onPlayerSpawn() 90 98 { 91 this->bLocalPlayerDead = true; 99 this->bLocalPlayerDead = false; 100 this->deathScreen->setVisibility(false); 92 101 } 93 102 … … 97 106 * @param player the killed player 98 107 */ 99 void MultiplayerTeamDeathmatch::onPlayerDeath( Player* player)108 void MultiplayerTeamDeathmatch::onPlayerDeath() 100 109 { 101 this->localPlayer = player;102 110 this->bLocalPlayerDead = true; 111 this->deathScreen->setVisibility(true); 103 112 } 104 113 … … 118 127 119 128 // long enough dead? 120 if( dt >= this->deathTimeout)129 if( this->timeout >= this->deathTimeout) 121 130 { 122 131 this->timeout = 0.0f; 123 124 132 // respawn 133 (State::getPlayer())->getPlayable()->respawn(); 125 134 } 126 135 } -
trunk/src/util/multiplayer_team_deathmatch.h
r7039 r7044 29 29 30 30 31 virtual void onPlayerSpawn( Player* player);32 virtual void onPlayerDeath( Player* player);31 virtual void onPlayerSpawn(); 32 virtual void onPlayerDeath(); 33 33 34 34
Note: See TracChangeset
for help on using the changeset viewer.