Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

removed some bugs and added texture sync

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.