Changeset 9068 in orxonox.OLD for branches/presentation/src/util
- Timestamp:
- Jul 3, 2006, 8:55:53 PM (18 years ago)
- Location:
- branches/presentation/src/util
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/util/multiplayer_team_deathmatch.cc
r9059 r9068 455 455 ClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() ); 456 456 std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId ); 457 std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId ); 457 458 458 459 BaseObject * bo = Factory::fabricate( playableClassId ); … … 463 464 Playable & playable = *(dynamic_cast<Playable*>(bo)); 464 465 465 playable.loadModel( playableModel ); 466 if ( playableTexture != "" ) 467 playable.loadMD2Texture( playableTexture ); 468 if ( playableModel != "" ) 469 playable.loadModel( playableModel ); 466 470 playable.setOwner( userId ); 467 471 playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() ); … … 797 801 } 798 802 803 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId ) 804 { 805 if ( classId == CL_FPS_PLAYER ) 806 { 807 return "maps/doom_guy.png"; 808 } 809 810 return ""; 811 } 812 -
branches/presentation/src/util/multiplayer_team_deathmatch.h
r9059 r9068 39 39 virtual int getTeamForNewUser(); 40 40 virtual ClassID getPlayableClassId( int userId, int team ); 41 virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId ); 41 42 virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId ); 42 43 -
branches/presentation/src/util/network_game_rules.cc
r8623 r9068 40 40 } 41 41 42 43 std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, ClassID classId ) 44 { 45 return ""; 46 } 47 42 48 std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, ClassID classId ) 43 49 { -
branches/presentation/src/util/network_game_rules.h
r8623 r9068 23 23 virtual ClassID getPlayableClassId( int userId, int team ); 24 24 virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId ); 25 virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId ); 25 26 26 27 virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); } -
branches/presentation/src/util/signal_handler.h
r8623 r9068 44 44 public: 45 45 inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; } 46 ~SignalHandler(){ SignalHandler::singletonRef = NULL; } 46 47 47 48 void registerCallback( SignalCallback cb, void * someData );
Note: See TracChangeset
for help on using the changeset viewer.