Changeset 10114 in orxonox.OLD for trunk/src/util
- Timestamp:
- Dec 19, 2006, 11:55:26 PM (18 years ago)
- Location:
- trunk/src/util
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/game_rules.cc
r9869 r10114 65 65 PRINTF(4)("Adding Mission Goal:%s\n", element->Value()); 66 66 BaseObject* created = Factory::fabricate(element); 67 if (created != NULL /*&& created->isA( CL_GAME_RULES)*/)67 if (created != NULL /*&& created->isA(GameRules::staticClassID())*/) 68 68 { 69 69 MissionGoal* mg = dynamic_cast<MissionGoal*>(created); -
trunk/src/util/kill_target.cc
r9869 r10114 22 22 23 23 24 #include "class_id_DEPRECATED.h" 25 ObjectListDefinition ID(KillTarget, CL_KILL_TARGET);24 25 ObjectListDefinition(KillTarget); 26 26 CREATE_FACTORY(KillTarget); 27 27 -
trunk/src/util/multiplayer_team_deathmatch.cc
r9869 r10114 46 46 #include "spawning_point.h" 47 47 48 49 50 #include "class_id_DEPRECATED.h" 51 52 ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH); 48 #include "creatures/fps_player.h" 49 50 ObjectListDefinition(MultiplayerTeamDeathmatch); 53 51 CREATE_FACTORY(MultiplayerTeamDeathmatch); 54 52 /** … … 148 146 box->setAbsCoor2D( 300, 100 ); 149 147 150 if( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive()) 151 { 152 OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator"); 153 box->pack( buttonSpectator ); 154 buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator); 155 156 OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random"); 157 box->pack( buttonRandom ); 158 buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom); 159 160 OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team"); 161 box->pack( buttonTeam0 ); 162 buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0); 163 164 OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team"); 165 box->pack( buttonTeam1 ); 166 buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1); 167 } 168 else 169 { 170 OrxGui::GLGuiText* text = new OrxGui::GLGuiText(); 171 text->setText("Server Mode: not able to play at this node"); 172 box->pack( text); 173 } 174 148 OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator"); 149 box->pack( buttonSpectator ); 150 buttonSpectator->released.connect(this, &MultiplayerTeamDeathmatch::onButtonSpectator); 151 152 OrxGui::GLGuiPushButton * buttonRandom = new OrxGui::GLGuiPushButton("Random"); 153 box->pack( buttonRandom ); 154 buttonRandom->released.connect(this, &MultiplayerTeamDeathmatch::onButtonRandom); 155 156 OrxGui::GLGuiPushButton * buttonTeam0 = new OrxGui::GLGuiPushButton("Blue Team"); 157 box->pack( buttonTeam0 ); 158 buttonTeam0->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam0); 159 160 OrxGui::GLGuiPushButton * buttonTeam1 = new OrxGui::GLGuiPushButton("Red Team"); 161 box->pack( buttonTeam1 ); 162 buttonTeam1->released.connect(this, &MultiplayerTeamDeathmatch::onButtonTeam1); 175 163 176 164 if ( bShowTeamChange ) … … 307 295 308 296 if ( team == 0 || team == 1 ) 309 return ObjectListBase::retrieveIdentity(" TurbineHover");297 return ObjectListBase::retrieveIdentity("FPSPlayer"); 310 298 311 299 assert( false ); … … 315 303 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId ) 316 304 { 317 if (classId == CL_TURBINE_HOVER)318 return "models/ships/hoverglider_mainbody.obj";319 305 if ( team == 0 ) 320 306 return "models/creatures/doom_guy.md2"; … … 322 308 return "models/creatures/male.md2"; 323 309 else 310 { 324 311 return ""; 312 } 325 313 } 326 314 327 315 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ) 328 316 { 329 if ( classId == CL_FPS_PLAYER)317 if ( team == 0 || team == 1 ) 330 318 { 331 319 if ( team == 0 ) 332 return " maps/doom_guy.png";320 return "doom_guy.png"; 333 321 else 334 return "ma ps/male_fiend.pcx";322 return "male_fiend.pcx"; 335 323 } 336 324 … … 340 328 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId ) 341 329 { 342 if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER))330 if ( classId == FPSPlayer::staticClassID() ) 343 331 { 344 332 return 10.0f; … … 499 487 500 488 assert( bo != NULL ); 501 assert( bo->isA( CL_PLAYABLE) );489 assert( bo->isA( Playable::staticClassID() ) ); 502 490 503 491 Playable & playable = *(dynamic_cast<Playable*>(bo)); 504 492 493 PRINTF(0)("%s %s %f\n", playableModel.c_str(), playableTexture.c_str(), playableScale ); 494 505 495 playable.loadMD2Texture( playableTexture ); 506 496 playable.loadModel( playableModel, playableScale ); -
trunk/src/util/signal_handler.cc
r9406 r10114 42 42 catchSignal( SIGSEGV ); 43 43 catchSignal( SIGABRT ); 44 catchSignal( SIGILL ); 44 45 } 45 46 … … 94 95 case SIGABRT: 95 96 sigName = "SIGABRT"; 97 break; 98 case SIGILL: 99 sigName = "SIGILL"; 96 100 break; 97 101 } -
trunk/src/util/singleplayer_shootemup.cc
r9869 r10114 25 25 26 26 27 #include "class_id_DEPRECATED.h" 28 ObjectListDefinition ID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);27 28 ObjectListDefinition(SingleplayerShootemup); 29 29 CREATE_FACTORY(SingleplayerShootemup); 30 30
Note: See TracChangeset
for help on using the changeset viewer.