Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8979


Ignore:
Timestamp:
Dec 14, 2011, 2:16:45 PM (12 years ago)
Author:
eceline
Message:

not much changed

Location:
code/branches/spaceraceTwo
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/spaceraceTwo/data/levels/Spacerace2.oxw

    r8971 r8979  
    9797        <WaypointPatrolController alertnessradius=1000 team=10>
    9898          <waypoints>
    99             <Model mesh="cube.mesh" scale=8 position="0,-2000,1000" />
    100             <Model mesh="cube.mesh" scale=8 position="0,2100,2300" />
    101             <Model mesh="cube.mesh" scale=8 position="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" />
    102102          </waypoints>
    103103        </WaypointPatrolController>
     
    108108
    109109
    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
    111202
    112203   
  • code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.cc

    r8970 r8979  
    5959        this->settingsChanged();
    6060        this->reached_=NULL;
    61         //this->addTarget("WorldEntity");
     61     
    6262    }
    6363   
  • code/branches/spaceraceTwo/src/modules/gametypes/RaceCheckPoint.h

    r8970 r8979  
    4242    @brief
    4343        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
    4545    */
    4646    class _GametypesExport RaceCheckPoint : public DistanceMultiTrigger, public RadarViewable
     
    8383
    8484        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
    8687           
    87             Vector3 nextcheckpoints_; //the indexes of the next check points
    88             std::vector<RaceCheckPoint*> next_;
    8988    };
    9089}
  • code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.cc

    r8971 r8979  
    5151        this->cantMove_=false;
    5252       
    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 functionallity
    55        
    5653    }
     54       
    5755   
    5856  // void SpaceRace::SetConfigValues(){
     
    8381            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    8482            ChatManager::message(message);
    85 /*
     83
    8684            float time = this->clock_.getSecondsPrecise();
    8785            this->scores_.insert(time);
    8886            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
    9289        }
    9390    }
     
    9996        Gametype::checkStart();
    10097        this->cantMove_=true;
    101         //TODO: switch the engine off/on via a short function 
     98       
    10299        for(ObjectList<Engine>::iterator it = ObjectList<Engine>::begin(); it; ++it)
    103100        {
    104101            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           
    116103        }
    117104        this->addBots(this->numberOfBots_);
     
    127114            {
    128115                it->setActive(true);
    129                 /*it->setMaxSpeedBack(this->maxSpeedBack_);
    130                 it->setMaxSpeedFront(this->maxSpeedFront_);
    131                 it->setMaxSpeedLeftRight(this->maxSpeedLeftRight_);
    132                 it->setMaxSpeedUpDown(this->maxSpeedUpDown_);*/
     116               
    133117            }
    134118            this->cantMove_= false;
  • code/branches/spaceraceTwo/src/modules/gametypes/SpaceRace.h

    r8970 r8979  
    4040#include "gametypes/Gametype.h"
    4141
    42 
    43 
    4442#include "SpaceRaceManager.h"
    4543
     
    5351    {
    5452        friend class RaceCheckPoint;
    55         //friend class SpaceRaceManager;
     53       
    5654
    5755        public:
     
    8583            virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
    8684        private:
    87             float maxSpeedBack_; float maxSpeedFront_; float maxSpeedLeftRight_; float maxSpeedUpDown_;
    8885            bool cantMove_;
    8986            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  
    8686        SUPER(SpaceRaceManager, XMLPort, xmlelement, mode);
    8787
    88         //XMLPortParam(WaypointController, "accuracy", setAccuracy, getAccuracy, xmlelement, mode).defaultValues(100.0f);
     88       
    8989        XMLPortObject(SpaceRaceManager, RaceCheckPoint, "checkpoints", addCheckpoint, getCheckpoint,  xmlelement, mode);
    9090    }
     
    155155            {
    156156                if (index > -1)this->setRadVis(player,false);
     157                        else this->getCheckpoint(0)->setRadarVisibility(false);
    157158                gametype->newCheckpointReached(check,player);
    158159                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.