Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9068 in orxonox.OLD for branches/presentation/src/util


Ignore:
Timestamp:
Jul 3, 2006, 8:55:53 PM (18 years ago)
Author:
rennerc
Message:

removed some bugs and added texture sync

Location:
branches/presentation/src/util
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/util/multiplayer_team_deathmatch.cc

    r9059 r9068  
    455455  ClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() );
    456456  std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId );
     457  std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId );
    457458
    458459  BaseObject * bo = Factory::fabricate( playableClassId );
     
    463464  Playable & playable = *(dynamic_cast<Playable*>(bo));
    464465
    465   playable.loadModel( playableModel );
     466  if ( playableTexture != "" )
     467    playable.loadMD2Texture( playableTexture );
     468  if ( playableModel != "" )
     469    playable.loadModel( playableModel );
    466470  playable.setOwner( userId );
    467471  playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
     
    797801}
    798802
     803std::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  
    3939    virtual int getTeamForNewUser();
    4040    virtual ClassID getPlayableClassId( int userId, int team );
     41    virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId );
    4142    virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId );
    4243
  • branches/presentation/src/util/network_game_rules.cc

    r8623 r9068  
    4040}
    4141
     42
     43std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, ClassID classId )
     44{
     45  return "";
     46}
     47
    4248std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, ClassID classId )
    4349{
  • branches/presentation/src/util/network_game_rules.h

    r8623 r9068  
    2323    virtual ClassID getPlayableClassId( int userId, int team );
    2424    virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId );
     25    virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId );
    2526   
    2627    virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); }
  • branches/presentation/src/util/signal_handler.h

    r8623 r9068  
    4444  public:
    4545    inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }
     46    ~SignalHandler(){ SignalHandler::singletonRef = NULL; }
    4647
    4748    void registerCallback( SignalCallback cb, void * someData );
Note: See TracChangeset for help on using the changeset viewer.