Changeset 9704 in orxonox.OLD for branches/new_class_id/src/util/network_game_rules.cc
- Timestamp:
- Aug 25, 2006, 12:22:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/util/network_game_rules.cc
r9406 r9704 22 22 23 23 24 NewObjectListDefinition(NetworkGameRules); 24 25 25 26 /** … … 27 28 */ 28 29 NetworkGameRules::NetworkGameRules ( const TiXmlElement* root ) 29 : GameRules( root )30 : GameRules( root ) 30 31 { 31 this-> setClassID( CL_NETWORK_GAME_RULES, "NetworkGameRules");32 this->registerObject(this, NetworkGameRules::_objectList); 32 33 } 33 34 … … 37 38 */ 38 39 NetworkGameRules::~NetworkGameRules () 39 { 40 } 40 {} 41 41 42 42 43 std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, ClassIDclassId )43 std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId ) 44 44 { 45 45 return ""; 46 46 } 47 47 48 std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, ClassIDclassId )48 std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, const NewClassID& classId ) 49 49 { 50 50 return "models/ships/reap_#.obj"; 51 51 } 52 52 53 ClassID NetworkGameRules::getPlayableClassId( int userId, int team )53 NewClassID NetworkGameRules::getPlayableClassId( int userId, int team ) 54 54 { 55 return CL_SPACE_SHIP; 55 const NewObjectListBase* objList = NewObjectListBase::getObjectList("SpaceShip"); 56 if (objList != NULL) 57 return objList->identity(); 58 else 59 return NewClassID(); 56 60 } 57 61 … … 68 72 69 73 70 float NetworkGameRules::getPlayableScale( int userId, int team, ClassIDclassId )74 float NetworkGameRules::getPlayableScale( int userId, int team, const NewClassID& classId ) 71 75 { 72 76 return 1.0f;
Note: See TracChangeset
for help on using the changeset viewer.