Changeset 9406 in orxonox.OLD for trunk/src/util/multiplayer_team_deathmatch.cc
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/multiplayer_team_deathmatch.cc
r9235 r9406 49 49 50 50 51 using namespace std; 51 52 52 53 53 … … 87 87 this->input = new OrxGui::GLGuiInputLine(); 88 88 this->input->setAbsCoor2D(180, 5); 89 this->input-> connect(SIGNAL(input, enterPushed), this, SLOT(MultiplayerTeamDeathmatch, onInputEnter));89 this->input->enterPushed.connect(this, &MultiplayerTeamDeathmatch::onInputEnter); 90 90 } 91 91 … … 154 154 OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator"); 155 155 box->pack( buttonSpectator ); 156 buttonSpectator-> connect(SIGNAL(buttonSpectator, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonSpectator));156 buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator); 157 157 158 158 OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random"); 159 159 box->pack( buttonRandom ); 160 buttonRandom-> connect(SIGNAL(buttonRandom, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonRandom));160 buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom); 161 161 162 162 OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team"); 163 163 box->pack( buttonTeam0 ); 164 buttonTeam0-> connect(SIGNAL(buttonTeam0, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonTeam0));164 buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0); 165 165 166 166 OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team"); 167 167 box->pack( buttonTeam1 ); 168 buttonTeam1-> connect(SIGNAL(buttonTeam1, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonTeam1));168 buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1); 169 169 170 170 if ( bShowTeamChange ) … … 172 172 OrxGui::GLGuiPushButton * buttonCancel = new OrxGui::GLGuiPushButton("Cancel"); 173 173 box->pack( buttonCancel ); 174 buttonCancel-> connect(SIGNAL(buttonCancel, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonCancel));174 buttonCancel->released.connect(this, &MultiplayerTeamDeathmatch::onButtonCancel); 175 175 } 176 176 177 177 OrxGui::GLGuiPushButton * buttonExit = new OrxGui::GLGuiPushButton("Exit"); 178 178 box->pack( buttonExit ); 179 buttonExit-> connect(SIGNAL(buttonExit, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonExit));179 buttonExit->released.connect(this, &MultiplayerTeamDeathmatch::onButtonExit); 180 180 181 181 box->showAll(); … … 204 204 assignPlayable(); 205 205 206 if ( !SharedNetworkData::getInstance()->isGameServer() )206 if ( SharedNetworkData::getInstance()->isClient() ) 207 207 return; 208 208 … … 214 214 this->killList.erase( this->killList.begin() ); 215 215 } 216 216 217 217 218 218 … … 268 268 void MultiplayerTeamDeathmatch::checkGameRules() 269 269 { 270 if ( !SharedNetworkData::getInstance()->isGameServer() )270 if ( SharedNetworkData::getInstance()->isClient() ) 271 271 return; 272 272 … … 320 320 return "maps/male_fiend.pcx"; 321 321 } 322 322 323 323 return ""; 324 324 } … … 330 330 return 10.0f; 331 331 } 332 332 333 333 return 1.0f; 334 334 } … … 680 680 char st[10]; 681 681 int i = 0; 682 682 683 683 i = 2; 684 684 for ( TeamScoreList::const_iterator it = scoreList[0].begin(); it != scoreList[0].end(); it++ ) … … 719 719 return; 720 720 } 721 721 722 722 int killerUserId = killer->getOwner(); 723 723 int victimUserId = victim->getOwner(); 724 725 PRINTF(0)("%d %d %x %x %s %s\n", killerUserId, victimUserId, killer, victim, killer->getClass Name(), victim->getClassName());724 725 PRINTF(0)("%d %d %x %x %s %s\n", killerUserId, victimUserId, killer, victim, killer->getClassCName(), victim->getClassCName()); 726 726 727 727 PlayerStats & victimStats = *PlayerStats::getStats( victimUserId ); 728 728 PlayerStats & killerStats = *PlayerStats::getStats( killerUserId ); 729 729 730 730 if ( killerStats.getPlayable() != killer || victimStats.getPlayable() != victim ) 731 731 {
Note: See TracChangeset
for help on using the changeset viewer.