Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 3, 2012, 12:04:35 AM (12 years ago)
Author:
landauf
Message:

store the next checkpoints in a set instead of Vector3
+ some refactoring in SpaceRaceManager

File:
1 edited

Legend:

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

    r9262 r9263  
    5454                { return this->checkpointIndex_; }
    5555
    56             inline void setNextcheckpoint(const Vector3& checkpoints)
    57                 { this->nextcheckpoints_ = checkpoints; }
    58             inline const Vector3& getNextcheckpoint() const
    59                 { return this->nextcheckpoints_; }
     56            void setNextCheckpointsAsVector3(const Vector3& checkpoints);
     57            Vector3 getNextCheckpointsAsVector3() const;
     58            const std::set<int>& getNextCheckpoints() const
     59                { return this->nextCheckpoints_; }
    6060
    6161            inline void setLast(bool isLast)
     
    8080
    8181        private:
    82             int checkpointIndex_;     ///< The index of this check point. The race starts with the check point with the index 0
    83             Vector3 nextcheckpoints_; ///< the indexes of the next check points
    84             bool bIsLast_;            ///< True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level.
    85             float timeLimit_;         ///< The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses.
    86             PlayerInfo* player_;      ///< The player that reached the checkpoint
     82            int checkpointIndex_;           ///< The index of this check point. The race starts with the check point with the index 0
     83            std::set<int> nextCheckpoints_; ///< the indexes of the next check points
     84            bool bIsLast_;                  ///< True if this check point is the last of the level. There can be only one last check point for each level and there must be a last check point in the level.
     85            float timeLimit_;               ///< The time limit (from the start of the level) to reach this check point. If the check point is reached after this time, the game ends and the player looses.
     86            PlayerInfo* player_;            ///< The player that reached the checkpoint
    8787    };
    8888}
Note: See TracChangeset for help on using the changeset viewer.