- Timestamp:
- Dec 11, 2012, 6:13:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Racingbot/src/modules/gametypes/RaceCheckPoint.h
r9441 r9508 60 60 61 61 void setNextCheckpointsAsVector3(const Vector3& checkpoints); 62 Vector3 getNextCheckpointsAsVector3() const; 63 const std::set<int>& getNextCheckpoints() const 62 Vector3 getNextCheckpointsAsVector3(); 63 Vector3 getVirtualNextCheckpointsAsVector3() const; 64 void setNextVirtualCheckpointsAsVector3(const Vector3& checkpoints); 65 int changeVirtualToRealCheckPoint(int); 66 67 const std::set<int>& getVirtualNextCheckpoints() const 64 68 { 65 69 return this->nextCheckpoints_; 66 70 } 67 71 std::set<int> getNextCheckpoints() 72 { 73 std::set<int> temp; 74 std::set<int> temp2=getVirtualNextCheckpoints(); 75 for (std::set<int>::iterator it = temp2.begin(); it!=temp2.end(); ++it){ 76 temp.insert(changeVirtualToRealCheckPoint((*it))); 77 } 78 return temp; 79 } 68 80 inline void setLast(bool isLast) 69 81 { … … 91 103 92 104 protected: 105 93 106 virtual void fire(bool bIsTriggered, BaseObject* originator); 94 107 … … 99 112 100 113 private: 114 101 115 int checkpointIndex_; ///< The index of this check point. The race starts with the check point with the index 0 102 116 std::set<int> nextCheckpoints_; ///< the indexes of the next check points … … 105 119 std::vector<PlayerInfo*> players_; ///< The player that reached the checkpoint 106 120 Vector3 myPosition_; 121 std::map<int,int> virtualToRealCheckPoints_; // if virtualChepoint was inserted the original can be reconstructed 107 122 }; 108 123 }
Note: See TracChangeset
for help on using the changeset viewer.