Changeset 9068 in orxonox.OLD
- Timestamp:
- Jul 3, 2006, 8:55:53 PM (18 years ago)
- Location:
- branches/presentation/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/network/network_game_manager.cc
r9059 r9068 98 98 ClassID playableClassId = rules.getPlayableClassId( userId, team ); 99 99 std::string playableModel = rules.getPlayableModelFileName( userId, team, playableClassId ); 100 std::string playableTexture = rules.getPlayableModelFileName( userId, team, playableClassId ); 100 101 101 102 BaseObject * bo = Factory::fabricate( playableClassId ); … … 106 107 Playable & playable = *(dynamic_cast<Playable*>(bo)); 107 108 108 if ( playableModel != "" ) 109 if ( playableTexture != "" ) 110 playable.loadMD2Texture( playableTexture ); 111 if ( playableModel != "" ) 109 112 playable.loadModel( playableModel ); 110 113 playable.setOwner( userId ); -
branches/presentation/src/lib/network/shared_network_data.cc
r6822 r9068 44 44 */ 45 45 SharedNetworkData::~SharedNetworkData() 46 {} 46 { 47 SharedNetworkData::singletonRef = NULL; 48 } -
branches/presentation/src/lib/util/loading/game_loader.cc
r8717 r9068 57 57 delete this->currentCampaign; 58 58 this->currentCampaign = NULL; 59 60 GameLoader::singletonRef = NULL; 59 61 } 60 62 -
branches/presentation/src/subprojects/framework.cc
r7711 r9068 317 317 delete GraphicsEngine::getInstance(); 318 318 319 Framework::singletonRef = NULL; 319 320 } 320 321 -
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 ); -
branches/presentation/src/world_entities/world_entity.cc
r9061 r9068 85 85 86 86 this->toList(OM_NULL); 87 87 88 registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName" ) ); 88 89 modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) ); 89 90 scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling" ) ); 90 91 list_handle = registerVarId( new SynchronizeableInt( (int*)&objectListNumber, &list_write, "list" ) ); 92 93 health_handle = registerVarId( new SynchronizeableFloat( &this->health, &this->health_write, "health" ) ); 94 healthMax_handle = registerVarId( new SynchronizeableFloat( &this->healthMax, &this->healthMax_write, "maxHealth" ) ); 91 95 } 92 96 … … 837 841 this->toList( (OM_LIST)list_write ); 838 842 } 843 844 if ( std::find( id.begin(), id.end(), health_handle ) != id.end() ) 845 { 846 this->setHealth( health_write ); 847 } 848 849 if ( std::find( id.begin(), id.end(), healthMax_handle ) != id.end() ) 850 { 851 this->setHealthMax( healthMax_write ); 852 } 839 853 840 854 PNode::varChangeHandler( id ); -
branches/presentation/src/world_entities/world_entity.h
r9008 r9068 198 198 int list_write; //!< entity's list 199 199 int list_handle; //!< handle for list changes 200 201 float health_write; 202 int health_handle; 203 204 float healthMax_write; 205 int healthMax_handle; 200 206 201 207 CollisionHandle* collisionHandles[CREngine::CR_NUMBER]; //!< the list of the collision reactions
Note: See TracChangeset
for help on using the changeset viewer.