Changeset 8979 for code/branches/spaceraceTwo/src/modules
- Timestamp:
- Dec 14, 2011, 2:16:45 PM (13 years ago)
- Location:
- code/branches/spaceraceTwo/src/modules/gametypes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc
r8970 r8979 59 59 this->settingsChanged(); 60 60 this->reached_=NULL; 61 //this->addTarget("WorldEntity");61 62 62 } 63 63 -
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
r8970 r8979 42 42 @brief 43 43 The RaceCheckPoint class enables the creation of a check point to use in a SpaceRace level. 44 !!! Don't forget to control the indexes of your check points and to set one last check point!!!44 Don't forget to control the indexes of your check points and to set one last check point 45 45 */ 46 46 class _GametypesExport RaceCheckPoint : public DistanceMultiTrigger, public RadarViewable … … 83 83 84 84 private: 85 int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes. 85 int bCheckpointIndex_; //The index of this check point. 86 Vector3 nextcheckpoints_; //the indexes of the next check points 86 87 87 Vector3 nextcheckpoints_; //the indexes of the next check points88 std::vector<RaceCheckPoint*> next_;89 88 }; 90 89 } -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
r8971 r8979 51 51 this->cantMove_=false; 52 52 53 for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)54 {this->checkpointReached_[it->first]=-1;} //TODO: should be removed; no functionallity55 56 53 } 54 57 55 58 56 // void SpaceRace::SetConfigValues(){ … … 83 81 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 84 82 ChatManager::message(message); 85 /* 83 86 84 float time = this->clock_.getSecondsPrecise(); 87 85 this->scores_.insert(time); 88 86 std::set<float>::iterator it; 89 for (it=this->scores_.begin(); it!=this->scores_.end(); it++) 90 orxout(level::message) << multi_cast<std::string>(*it) << endl; 91 */ 87 88 92 89 } 93 90 } … … 99 96 Gametype::checkStart(); 100 97 this->cantMove_=true; 101 //TODO: switch the engine off/on via a short function98 102 99 for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it) 103 100 { 104 101 it->setActive(false); 105 /*if(it->getMaxSpeedFront()>0) 106 { 107 this->maxSpeedBack_=it->getMaxSpeedBack(); 108 this->maxSpeedFront_=it->getMaxSpeedFront(); 109 this->maxSpeedLeftRight_=it->getMaxSpeedLeftRight(); 110 this->maxSpeedUpDown_=(it->getMaxSpeedUpDown()); 111 } 112 it->setMaxSpeedBack(0); 113 it->setMaxSpeedFront(0); 114 it->setMaxSpeedLeftRight(0); 115 it->setMaxSpeedUpDown(0);*/ 102 116 103 } 117 104 this->addBots(this->numberOfBots_); … … 127 114 { 128 115 it->setActive(true); 129 /*it->setMaxSpeedBack(this->maxSpeedBack_); 130 it->setMaxSpeedFront(this->maxSpeedFront_); 131 it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_); 132 it->setMaxSpeedUpDown(this->maxSpeedUpDown_);*/ 116 133 117 } 134 118 this->cantMove_= false; -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h
r8970 r8979 40 40 #include "gametypes/Gametype.h" 41 41 42 43 44 42 #include "SpaceRaceManager.h" 45 43 … … 53 51 { 54 52 friend class RaceCheckPoint; 55 //friend class SpaceRaceManager;53 56 54 57 55 public: … … 85 83 virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables. 86 84 private: 87 float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;88 85 bool cantMove_; 89 86 std::map<PlayerInfo*, int>checkpointReached_; //The number of the last check point reached by each player. -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
r8970 r8979 86 86 SUPER(SpaceRaceManager, XMLPort, xmlelement, mode); 87 87 88 //XMLPortParam(WaypointController, "accuracy", setAccuracy, getAccuracy, xmlelement, mode).defaultValues(100.0f);88 89 89 XMLPortObject(SpaceRaceManager, RaceCheckPoint, "checkpoints", addCheckpoint, getCheckpoint, xmlelement, mode); 90 90 } … … 155 155 { 156 156 if (index > -1)this->setRadVis(player,false); 157 else this->getCheckpoint(0)->setRadarVisibility(false); 157 158 gametype->newCheckpointReached(check,player); 158 159 check->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
Note: See TracChangeset
for help on using the changeset viewer.