Changeset 8979
- Timestamp:
- Dec 14, 2011, 2:16:45 PM (13 years ago)
- Location:
- code/branches/spaceraceTwo
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceraceTwo/data/levels/Spacerace2.oxw
r8971 r8979 97 97 <WaypointPatrolController alertnessradius=1000 team=10> 98 98 <waypoints> 99 <Model mesh="cube.mesh" scale= 8position="0,-2000,1000" />100 <Model mesh="cube.mesh" scale= 8position="0,2100,2300" />101 <Model mesh="cube.mesh" scale= 8position="0,-400,300" />99 <Model mesh="cube.mesh" scale=0 position="0,-2000,1000" /> 100 <Model mesh="cube.mesh" scale=0 position="0,2100,2300" /> 101 <Model mesh="cube.mesh" scale=0 position="0,-400,300" /> 102 102 </waypoints> 103 103 </WaypointPatrolController> … … 108 108 109 109 110 110 <!-- ------------------Planet----------------- --> 111 <Planet position="0,0,0" scale=300 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f /> 112 <StaticEntity position="0,0,0" collisionType=static> 113 <collisionShapes> 114 <SphereCollisionShape radius="399" /> 115 </collisionShapes> 116 </StaticEntity> 117 118 <!-- ---------------asteroid ellipse----------------- --> 119 <?lua 120 max = 20 121 for i = 0, max, 1 122 do 123 y = math.sin(i/max*6)*2000 124 z = math.cos(i/max*6)*2500 125 x = 0 126 ?> 127 <?lua 128 for k = 1, 15, 1 129 do 130 j = math.random() 131 ?> 132 133 <MovableEntity 134 position = "<?lua print(x + math.random() * 500) ?>,<?lua print(y + math.random() * 500) ?>,<?lua print(z + math.random() * 1000) ?>" 135 collisionType = "dynamic" 136 linearDamping = "0.5" 137 angularDamping = "0.01" 138 collisiondamage = "0.01" 139 enablecollisiondamage = "true" 140 scale="<?lua print(j * 5) ?>" > 141 <attached> 142 <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh"> 143 <?lua if k == 5 then ?><attached><!-- ---------asteroid fog----- --> 144 <ParticleEmitter position="0,0,0" source="Orxonox/Steam" /> 145 </attached> <?lua end ?> 146 </Model> 147 </attached> 148 <collisionShapes> 149 <SphereCollisionShape radius="<?lua print(j * 80) ?>" /> 150 </collisionShapes> 151 </MovableEntity> 152 <?lua 153 end 154 ?> 155 <?lua end ?> 156 157 <!-- ---------------ForceFields----------------- --> 158 <ForceField position="0,-700,2700" direction="0,1,0" diameter=500 velocity=2000 length=600 /> 159 <MovableEntity position="0,-400,2700"> 160 <attached> 161 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/> 162 <?lua for i=0,15,1 do ?> 163 <Billboard position="-200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/> 164 <Billboard position="200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/> 165 <?lua end ?> 166 </attached> 167 </MovableEntity> 168 169 <ForceField position="0,2500,2000" direction="0,0,-1" diameter=250 velocity=2000 length=600 /> 170 <MovableEntity position="0,2500,2000"> 171 <attached> 172 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/> 173 <?lua for i=0,15,1 do ?> 174 <Billboard position="-100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/> 175 <Billboard position="100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/> 176 <?lua end ?> 177 </attached> 178 </MovableEntity> 179 180 <ForceField position="0,1300,-800" direction="0,-1,-1" diameter=250 velocity=2000 length=800 /> 181 <MovableEntity position="0,1300,-800"> 182 <attached> 183 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/> 184 <?lua for i=0,20,1 do ?> 185 <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/> 186 <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/> 187 <?lua end ?> 188 </attached> 189 </MovableEntity> 190 191 <ForceField position="0,-1400,-700" direction="0,-1,1" diameter=250 velocity=2000 length=600 /> 192 <MovableEntity position="0,-1400,-700"> 193 <attached> 194 <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/> 195 <?lua for i=0,15,1 do ?> 196 <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/> 197 <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/> 198 <?lua end ?> 199 </attached> 200 </MovableEntity> 201 111 202 112 203 -
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc
r8970 r8979 59 59 this->settingsChanged(); 60 60 this->reached_=NULL; 61 //this->addTarget("WorldEntity");61 62 62 } 63 63 -
code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h
r8970 r8979 42 42 @brief 43 43 The RaceCheckPoint class enables the creation of a check point to use in a SpaceRace level. 44 !!! Don't forget to control the indexes of your check points and to set one last check point!!!44 Don't forget to control the indexes of your check points and to set one last check point 45 45 */ 46 46 class _GametypesExport RaceCheckPoint : public DistanceMultiTrigger, public RadarViewable … … 83 83 84 84 private: 85 int bCheckpointIndex_; //The index of this check point. This value will be compared with the number of check points reached in the level. The check points must be indexed in ascending order beginning from zero and without any jumps between the indexes. 85 int bCheckpointIndex_; //The index of this check point. 86 Vector3 nextcheckpoints_; //the indexes of the next check points 86 87 87 Vector3 nextcheckpoints_; //the indexes of the next check points88 std::vector<RaceCheckPoint*> next_;89 88 }; 90 89 } -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc
r8971 r8979 51 51 this->cantMove_=false; 52 52 53 for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)54 {this->checkpointReached_[it->first]=-1;} //TODO: should be removed; no functionallity55 56 53 } 54 57 55 58 56 // void SpaceRace::SetConfigValues(){ … … 83 81 const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message); 84 82 ChatManager::message(message); 85 /* 83 86 84 float time = this->clock_.getSecondsPrecise(); 87 85 this->scores_.insert(time); 88 86 std::set<float>::iterator it; 89 for (it=this->scores_.begin(); it!=this->scores_.end(); it++) 90 orxout(level::message) << multi_cast<std::string>(*it) << endl; 91 */ 87 88 92 89 } 93 90 } … … 99 96 Gametype::checkStart(); 100 97 this->cantMove_=true; 101 //TODO: switch the engine off/on via a short function98 102 99 for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it) 103 100 { 104 101 it->setActive(false); 105 /*if(it->getMaxSpeedFront()>0) 106 { 107 this->maxSpeedBack_=it->getMaxSpeedBack(); 108 this->maxSpeedFront_=it->getMaxSpeedFront(); 109 this->maxSpeedLeftRight_=it->getMaxSpeedLeftRight(); 110 this->maxSpeedUpDown_=(it->getMaxSpeedUpDown()); 111 } 112 it->setMaxSpeedBack(0); 113 it->setMaxSpeedFront(0); 114 it->setMaxSpeedLeftRight(0); 115 it->setMaxSpeedUpDown(0);*/ 102 116 103 } 117 104 this->addBots(this->numberOfBots_); … … 127 114 { 128 115 it->setActive(true); 129 /*it->setMaxSpeedBack(this->maxSpeedBack_); 130 it->setMaxSpeedFront(this->maxSpeedFront_); 131 it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_); 132 it->setMaxSpeedUpDown(this->maxSpeedUpDown_);*/ 116 133 117 } 134 118 this->cantMove_= false; -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h
r8970 r8979 40 40 #include "gametypes/Gametype.h" 41 41 42 43 44 42 #include "SpaceRaceManager.h" 45 43 … … 53 51 { 54 52 friend class RaceCheckPoint; 55 //friend class SpaceRaceManager;53 56 54 57 55 public: … … 85 83 virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables. 86 84 private: 87 float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;88 85 bool cantMove_; 89 86 std::map<PlayerInfo*, int>checkpointReached_; //The number of the last check point reached by each player. -
code/branches/spaceraceTwo/src/modules/gametypes/SpaceRaceManager.cc
r8970 r8979 86 86 SUPER(SpaceRaceManager, XMLPort, xmlelement, mode); 87 87 88 //XMLPortParam(WaypointController, "accuracy", setAccuracy, getAccuracy, xmlelement, mode).defaultValues(100.0f);88 89 89 XMLPortObject(SpaceRaceManager, RaceCheckPoint, "checkpoints", addCheckpoint, getCheckpoint, xmlelement, mode); 90 90 } … … 155 155 { 156 156 if (index > -1)this->setRadVis(player,false); 157 else this->getCheckpoint(0)->setRadarVisibility(false); 157 158 gametype->newCheckpointReached(check,player); 158 159 check->setRadarObjectColour(ColourValue::Green); //sets the radar colour of the checkpoint to green if it is reached, else it is red.
Note: See TracChangeset
for help on using the changeset viewer.