[Orxonox-commit 4312] r8983 - in code/branches/spaceraceTwo: data/levels src/modules/gametypes src/orxonox/controllers
eceline at orxonox.net
eceline at orxonox.net
Wed Dec 14 15:53:15 CET 2011
Author: eceline
Date: 2011-12-14 15:53:15 +0100 (Wed, 14 Dec 2011)
New Revision: 8983
Modified:
code/branches/spaceraceTwo/data/levels/Spacerace2.oxw
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h
code/branches/spaceraceTwo/src/orxonox/controllers/WaypointPatrolController.cc
Log:
a few changes
Modified: code/branches/spaceraceTwo/data/levels/Spacerace2.oxw
===================================================================
--- code/branches/spaceraceTwo/data/levels/Spacerace2.oxw 2011-12-14 14:20:50 UTC (rev 8982)
+++ code/branches/spaceraceTwo/data/levels/Spacerace2.oxw 2011-12-14 14:53:15 UTC (rev 8983)
@@ -38,7 +38,7 @@
<SpaceRaceManager>
<checkpoints>
- <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">
+ <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">
<attached>
<Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
</attached>
@@ -94,7 +94,7 @@
<Template link=spaceshipassff />
</templates>
<controller>
- <WaypointPatrolController alertnessradius=1000 team=10>
+ <WaypointPatrolController alertnessradius=0 team=10>
<waypoints>
<Model mesh="cube.mesh" scale=0 position="0,-2000,1000" />
<Model mesh="cube.mesh" scale=0 position="0,2100,2300" />
Modified: code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h 2011-12-14 14:20:50 UTC (rev 8982)
+++ code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h 2011-12-14 14:53:15 UTC (rev 8983)
@@ -82,7 +82,7 @@
{ return this; }
private:
- int bCheckpointIndex_; //The index of this check point.
+ int bCheckpointIndex_; //The index of this check point. The race starts with the check point with the index 0
Vector3 nextcheckpoints_; //the indexes of the next check points
};
Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc 2011-12-14 14:20:50 UTC (rev 8982)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc 2011-12-14 14:53:15 UTC (rev 8983)
@@ -96,7 +96,7 @@
if(this->checkpoints_[0] != NULL && !this->firstcheckpointvisible_)
{
this->checkpoints_[0]->setRadarVisibility(true);
- this->firstcheckpointvisible_=false;
+ this->firstcheckpointvisible_=true;
}
for (size_t i = 0; i < this->checkpoints_.size(); ++i)
@@ -152,11 +152,11 @@
else if (check->getLast())
gametype->end();
else
- {
+ {
if (index > -1)this->setRadVis(player,false);
else this->getCheckpoint(0)->setRadarVisibility(false);
gametype->newCheckpointReached(check,player);
- check->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
+
this->setRadVis(player, true);
}
@@ -186,8 +186,10 @@
if(v.z > -1)
{
this->getCheckpoint(v.z)->setRadarVisibility(b);
- this->getCheckpoint(v.z)->settingsChanged();
+ this->getCheckpoint(v.z)->settingsChanged();
}
+
+
}
}
Modified: code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h
===================================================================
--- code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h 2011-12-14 14:20:50 UTC (rev 8982)
+++ code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.h 2011-12-14 14:53:15 UTC (rev 8983)
@@ -67,11 +67,11 @@
void tick(float dt);
protected:
- void setRadVis(PlayerInfo* player, bool b);
+ void setRadVis(PlayerInfo* player, bool b);//sets RadarVisibility of the checkpoints the player can reach.
private:
std::vector<RaceCheckPoint*> checkpoints_;
- bool firstcheckpointvisible_;
+ bool firstcheckpointvisible_;//true if the first check point is visible.
};
}
Modified: code/branches/spaceraceTwo/src/orxonox/controllers/WaypointPatrolController.cc
===================================================================
--- code/branches/spaceraceTwo/src/orxonox/controllers/WaypointPatrolController.cc 2011-12-14 14:20:50 UTC (rev 8982)
+++ code/branches/spaceraceTwo/src/orxonox/controllers/WaypointPatrolController.cc 2011-12-14 14:53:15 UTC (rev 8983)
@@ -77,7 +77,7 @@
}
void WaypointPatrolController::searchEnemy()
- {/*
+ {
this->patrolTimer_.setInterval(rnd());
if (!this->getControllableEntity())
@@ -100,6 +100,6 @@
}
if (shortestsqdistance > (this->alertnessradius_ * this->alertnessradius_))
- this->target_ = 0;*/
+ this->target_ = 0;
}
}
More information about the Orxonox-commit
mailing list