Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 11, 2012, 6:13:18 PM (11 years ago)
Author:
purgham
Message:

still not working!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Racingbot/src/modules/gametypes/RaceCheckPoint.h

    r9441 r9508  
    6060
    6161            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
    6468            {
    6569                return this->nextCheckpoints_;
    6670            }
    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            }
    6880            inline void setLast(bool isLast)
    6981            {
     
    91103
    92104        protected:
     105
    93106            virtual void fire(bool bIsTriggered, BaseObject* originator);
    94107
     
    99112
    100113        private:
     114
    101115            int checkpointIndex_; ///< The index of this check point. The race starts with the check point with the index 0
    102116            std::set<int> nextCheckpoints_; ///< the indexes of the next check points
     
    105119            std::vector<PlayerInfo*> players_; ///< The player that reached the checkpoint
    106120            Vector3 myPosition_;
     121            std::map<int,int> virtualToRealCheckPoints_; // if virtualChepoint was inserted the original can be reconstructed
    107122    };
    108123}
Note: See TracChangeset for help on using the changeset viewer.