Changeset 9715 in orxonox.OLD for branches/new_class_id/src/util/multiplayer_team_deathmatch.cc
- Timestamp:
- Sep 1, 2006, 8:06:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/util/multiplayer_team_deathmatch.cc
r9709 r9715 50 50 #include "class_id.h" 51 51 52 NewObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);52 ObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH); 53 53 CREATE_FACTORY(MultiplayerTeamDeathmatch); 54 54 /** … … 301 301 } 302 302 303 NewClassID MultiplayerTeamDeathmatch::getPlayableClassId( int userId, int team )303 ClassID MultiplayerTeamDeathmatch::getPlayableClassId( int userId, int team ) 304 304 { 305 305 if ( team == TEAM_NOTEAM || team == TEAM_SPECTATOR ) 306 return NewObjectListBase::retrieveIdentity("Spectator");306 return ObjectListBase::retrieveIdentity("Spectator"); 307 307 308 308 if ( team == 0 || team == 1 ) 309 return NewObjectListBase::retrieveIdentity("TurbineHover");309 return ObjectListBase::retrieveIdentity("TurbineHover"); 310 310 311 311 assert( false ); … … 313 313 314 314 315 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const NewClassID& classId )315 std::string MultiplayerTeamDeathmatch::getPlayableModelFileName( int userId, int team, const ClassID& classId ) 316 316 { 317 317 if (classId == CL_TURBINE_HOVER) … … 325 325 } 326 326 327 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const NewClassID& classId )327 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ) 328 328 { 329 329 if ( classId == CL_FPS_PLAYER ) … … 338 338 } 339 339 340 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const NewClassID& classId )341 { 342 if ( classId == NewObjectListBase::retrieveIdentity(CL_FPS_PLAYER))340 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, const ClassID& classId ) 341 { 342 if ( classId == ObjectListBase::retrieveIdentity(CL_FPS_PLAYER)) 343 343 { 344 344 return 10.0f; … … 358 358 teamScore[i] = 0; 359 359 360 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();360 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 361 361 it != PlayerStats::objectList().end(); 362 362 ++it) … … 382 382 playersInTeam[i] = 0; 383 383 384 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();384 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 385 385 it != PlayerStats::objectList().end(); 386 386 ++it) … … 442 442 void MultiplayerTeamDeathmatch::handleTeamChanges( ) 443 443 { 444 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();444 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 445 445 it != PlayerStats::objectList().end(); 446 446 ++it) … … 458 458 459 459 //now serve player who want join a random team 460 for ( NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();460 for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin(); 461 461 it != PlayerStats::objectList().end(); 462 462 ++it) … … 491 491 492 492 493 NewClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() );493 ClassID playableClassId = getPlayableClassId( userId, stats.getPreferedTeamId() ); 494 494 std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId ); 495 495 std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId ); … … 813 813 std::vector<SpawningPoint*> spList; 814 814 815 for ( NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();815 for (ObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin(); 816 816 it != SpawningPoint::objectList().end(); 817 817 ++it) … … 825 825 if ( spList.size() == 0 ) 826 826 { 827 for ( NewObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin();827 for (ObjectList<SpawningPoint>::const_iterator it = SpawningPoint::objectList().begin(); 828 828 it != SpawningPoint::objectList().end(); 829 829 ++it)
Note: See TracChangeset
for help on using the changeset viewer.