Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9117 in orxonox.OLD


Ignore:
Timestamp:
Jul 4, 2006, 1:21:19 PM (18 years ago)
Author:
rennerc
Message:

player joins game with last chosen nickname

Location:
branches/presentation/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/network/network_game_manager.cc

    r9116 r9117  
    101101  std::string playableModel = rules.getPlayableModelFileName( userId, team, playableClassId );
    102102  std::string playableTexture = rules.getPlayableModelFileName( userId, team, playableClassId );
     103  float       playableScale = rules.getPlayableScale( userId, team, playableClassId );
    103104 
    104105  BaseObject * bo = Factory::fabricate( playableClassId );
     
    109110  Playable & playable = *(dynamic_cast<Playable*>(bo));
    110111 
    111   if ( playableTexture != "" )
    112     playable.loadMD2Texture( playableTexture );
    113   if ( playableModel != "" )
    114     playable.loadModel( playableModel );
     112  playable.loadMD2Texture( playableTexture );
     113 
     114  playable.loadModel( playableModel, playableScale );
    115115  playable.setOwner( userId );
    116116  playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
  • branches/presentation/src/util/multiplayer_team_deathmatch.cc

    r9110 r9117  
    792792}
    793793
     794float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, ClassID classId )
     795{
     796  if ( classId == CL_FPS_PLAYER )
     797  {
     798    return 10.0f;
     799  }
     800 
     801  return 1.0f;
     802}
  • branches/presentation/src/util/multiplayer_team_deathmatch.h

    r9110 r9117  
    4141    virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId );
    4242    virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId );
     43    virtual float getPlayableScale( int userId, int team, ClassID classId );
    4344
    4445    virtual void registerSpawn( WorldEntity * we );
  • branches/presentation/src/util/network_game_rules.cc

    r9110 r9117  
    6868
    6969
     70float NetworkGameRules::getPlayableScale( int userId, int team, ClassID classId )
     71{
     72  return 1.0f;
     73}
  • branches/presentation/src/util/network_game_rules.h

    r9110 r9117  
    2424    virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId );
    2525    virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId );
     26    virtual float getPlayableScale( int userId, int team, ClassID classId );
    2627   
    2728    virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); }
Note: See TracChangeset for help on using the changeset viewer.