Changeset 8983 for code/branches/spaceraceTwo
- Timestamp:
- Dec 14, 2011, 3:53:15 PM (13 years ago)
- Location:
- code/branches/spaceraceTwo
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceraceTwo/data/levels/Spacerace2.oxw
r8979 r8983 39 39 <SpaceRaceManager> 40 40 <checkpoints> 41 <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false" nextcheckpoints="1,2, 0">41 <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false" nextcheckpoints="1,2,-1"> 42 42 <attached> 43 43 <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" /> … … 95 95 </templates> 96 96 <controller> 97 <WaypointPatrolController alertnessradius= 1000 team=10>97 <WaypointPatrolController alertnessradius=0 team=10> 98 98 <waypoints> 99 99 <Model mesh="cube.mesh" scale=0 position="0,-2000,1000" /> -
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
r8979 r8983 83 83 84 84 private: 85 int bCheckpointIndex_; //The index of this check point. 85 int bCheckpointIndex_; //The index of this check point. The race starts with the check point with the index 0 86 86 Vector3 nextcheckpoints_; //the indexes of the next check points 87 87 -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
r8979 r8983 97 97 { 98 98 this->checkpoints_[0]->setRadarVisibility(true); 99 this->firstcheckpointvisible_= false;99 this->firstcheckpointvisible_=true; 100 100 } 101 101 … … 153 153 gametype->end(); 154 154 else 155 155 { 156 156 if (index > -1)this->setRadVis(player,false); 157 157 else this->getCheckpoint(0)->setRadarVisibility(false); 158 158 gametype->newCheckpointReached(check,player); 159 check->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.159 160 160 161 161 this->setRadVis(player, true); … … 187 187 { 188 188 this->getCheckpoint(v.z)->setRadarVisibility(b); 189 189 this->getCheckpoint(v.z)->settingsChanged(); 190 190 } 191 192 191 193 } 192 194 -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h
r8970 r8983 68 68 69 69 protected: 70 void setRadVis(PlayerInfo* player, bool b); 70 void setRadVis(PlayerInfo* player, bool b);//sets RadarVisibility of the checkpoints the player can reach. 71 71 72 72 private: 73 73 std::vector<RaceCheckPoint*> checkpoints_; 74 bool firstcheckpointvisible_; 74 bool firstcheckpointvisible_;//true if the first check point is visible. 75 75 76 76 }; -
code/branches/spaceraceTwo/src/orxonox/controllers/WaypointPatrolController.cc
r8968 r8983 78 78 79 79 void WaypointPatrolController::searchEnemy() 80 { /*80 { 81 81 this->patrolTimer_.setInterval(rnd()); 82 82 … … 101 101 102 102 if (shortestsqdistance > (this->alertnessradius_ * this->alertnessradius_)) 103 this->target_ = 0; */103 this->target_ = 0; 104 104 } 105 105 }
Note: See TracChangeset
for help on using the changeset viewer.