Changeset 9494 in orxonox.OLD for trunk/src/util/multiplayer_team_deathmatch.cc
- Timestamp:
- Jul 27, 2006, 10:44:28 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/multiplayer_team_deathmatch.cc
r9406 r9494 152 152 box->setAbsCoor2D( 300, 100 ); 153 153 154 OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator"); 155 box->pack( buttonSpectator ); 156 buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator); 157 158 OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random"); 159 box->pack( buttonRandom ); 160 buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom); 161 162 OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team"); 163 box->pack( buttonTeam0 ); 164 buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0); 165 166 OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team"); 167 box->pack( buttonTeam1 ); 168 buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1); 154 if( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive()) 155 { 156 OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator"); 157 box->pack( buttonSpectator ); 158 buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator); 159 160 OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random"); 161 box->pack( buttonRandom ); 162 buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom); 163 164 OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team"); 165 box->pack( buttonTeam0 ); 166 buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0); 167 168 OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team"); 169 box->pack( buttonTeam1 ); 170 buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1); 171 } 172 else 173 { 174 OrxGui::GLGuiText* text = new OrxGui::GLGuiText(); 175 text->setText("Server Mode: not able to play at this node"); 176 box->pack( text); 177 } 178 169 179 170 180 if ( bShowTeamChange ) … … 204 214 assignPlayable(); 205 215 206 if ( SharedNetworkData::getInstance()->isClient() )216 if ( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive()) 207 217 return; 208 218 … … 268 278 void MultiplayerTeamDeathmatch::checkGameRules() 269 279 { 270 if ( SharedNetworkData::getInstance()->isClient() )280 if ( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive()) 271 281 return; 272 282 … … 296 306 297 307 if ( team == 0 || team == 1 ) 298 return CL_ FPS_PLAYER;308 return CL_TURBINE_HOVER; 299 309 300 310 assert( false ); … … 303 313 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, ClassID classId ) 304 314 { 315 if (classId == CL_TURBINE_HOVER) 316 return "models/ships/hoverglider_mainbody.obj"; 305 317 if ( team == 0 ) 306 318 return "models/creatures/doom_guy.md2";
Note: See TracChangeset
for help on using the changeset viewer.