Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9039 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 3, 2006, 3:16:31 PM (18 years ago)
Author:
bensch
Message:

added cruizer

Location:
branches/single_player_map/src
Files:
4 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/defs/class_id.h

    r9006 r9039  
    199199  CL_HOVER                      =    0x0000035e,
    200200  CL_TURBINE_HOVER              =    0x0000035f,
    201   CL_SPECTATOR                  =    0x00000360,
    202   CL_COLLISION_PROBE            =    0x00000361,
    203   CL_FPS_PLAYER                 =    0x00000362,
     201  CL_CRUIZER                    =    0x00000360,
     202  CL_SPECTATOR                  =    0x0000036a,
     203  CL_COLLISION_PROBE            =    0x0000036b,
     204  CL_FPS_PLAYER                 =    0x0000036c,
    204205
    205206  // Powerups
  • branches/single_player_map/src/lib/graphics/text_engine/font_data.cc

    r8765 r9039  
    279279    Glyph* tmpGlyph;
    280280
    281     if (tmpGlyph = this->glyphArray[i])
     281    if ((tmpGlyph = this->glyphArray[i]) != NULL)
    282282    {
    283283      if (tmpGlyph->height*this->renderSize > maxLineHeight)
  • branches/single_player_map/src/world_entities/WorldEntities.am

    r9003 r9039  
    4545                world_entities/space_ships/turbine_hover.cc \
    4646                world_entities/space_ships/collision_probe.cc \
     47                world_entities/space_ships/cruizer.cc \
    4748                world_entities/creatures/md2_creature.cc \
    4849                world_entities/creatures/fps_player.cc \
     
    107108                space_ships/hover.h \
    108109                space_ships/turbine_hover.h \
    109                 space_ships/collision_probe.cc \
     110                space_ships/collision_probe.h \
     111                space_ships/cruizer.h \
    110112                creatures/md2_creature.h \
    111113                creatures/fps_player.h \
  • branches/single_player_map/src/world_entities/elements/glgui_radar.cc

    r9003 r9039  
    4242    this->setBackgroundTexture("gui_radar.png");
    4343
    44     this->_updateInterval = 1.0f;
     44    this->_updateInterval = 0.5f;
    4545    this->_timePassed = 0.0f;
    4646    this->_range = 100.0f;
     
    8888    _timePassed+=dt;
    8989
    90     //if (_timePassed > _updateInterval)
     90    if (_timePassed > _updateInterval)
    9191    {
    9292      _timePassed = 0 ; //-=_updateInterval;
  • branches/single_player_map/src/world_entities/space_ships/cruizer.cc

    r9036 r9039  
    1717#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
    1818
    19 #include "turbine_hover.h"
     19#include "cruizer.h"
    2020
    2121#include "weapons/weapon_manager.h"
     
    3434#include "debug.h"
    3535
    36 CREATE_FACTORY(TurbineHover, CL_TURBINE_HOVER);
    37 
    38 /**
    39  *  destructs the turbine_hover, deletes alocated memory
     36CREATE_FACTORY(Cruizer, CL_CRUIZER);
     37
     38/**
     39 *  destructs the cruizer, deletes alocated memory
    4040 */
    41 TurbineHover::~TurbineHover ()
     41Cruizer::~Cruizer ()
    4242{
    4343  this->setPlayer(NULL);
     
    4545
    4646/**
    47  * @brief loads a TurbineHover information from a specified file.
    48  * @param fileName the name of the File to load the turbine_hover from (absolute path)
     47 * @brief loads a Cruizer information from a specified file.
     48 * @param fileName the name of the File to load the cruizer from (absolute path)
    4949 */
    50 TurbineHover::TurbineHover(const std::string& fileName)
     50Cruizer::Cruizer(const std::string& fileName)
    5151{
    5252  this->init();
     
    5555  if(!doc.LoadFile())
    5656  {
    57     PRINTF(2)("Loading file %s failed for TurbineHover.\n", fileName.c_str());
     57    PRINTF(2)("Loading file %s failed for Cruizer.\n", fileName.c_str());
    5858    return;
    5959  }
     
    6868   @todo add more parameters to load
    6969*/
    70 TurbineHover::TurbineHover(const TiXmlElement* root)
     70Cruizer::Cruizer(const TiXmlElement* root)
    7171{
    7272  this->init();
     
    7474    this->loadParams(root);
    7575
    76   //weapons:
    77   Weapon* wpRight = new TestGun(0);
    78   wpRight->setName("testGun Right");
    79   Weapon* wpLeft = new TestGun(1);
    80   wpLeft->setName("testGun Left");
    81   //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER));
    82 
    83   //  cannon->setName("BFG");
    84 
    85   this->addWeapon(wpLeft, 1, 0);
    86   this->addWeapon(wpRight,1 ,1);
    87   //this->addWeapon(cannon, 0, 2);
    8876
    8977  this->getWeaponManager().changeWeaponConfig(1);
    9078  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
    9179
    92   this->loadModel("models/ships/hoverglider_mainbody.obj");
    93 }
    94 
    95 
    96 /**
    97  * @brief initializes a TurbineHover
     80  exit(-1);
     81  this->loadModel("models/ships/human_cruizer.obj");
     82}
     83
     84
     85/**
     86 * @brief initializes a Cruizer
    9887 */
    99 void TurbineHover::init()
     88void Cruizer::init()
    10089{
    10190  //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
    102   this->setClassID(CL_TURBINE_HOVER, "TurbineHover");
     91  this->setClassID(CL_CRUIZER, "Cruizer");
    10392
    10493  this->setSupportedPlaymodes(Playable::Full3D | Playable::Horizontal | Playable::Vertical);
     
    150139  this->burstEmitter[0]->setRelCoor(0, -0.7, 0);
    151140  this->burstEmitter[0]->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1)));
    152   this->burstEmitter[0]->setName("TurbineHover_Burst_emitter_Left");
     141  this->burstEmitter[0]->setName("Cruizer_Burst_emitter_Left");
    153142
    154143  this->burstEmitter[1] = new DotEmitter(200, 5.0, .01);
     
    156145  this->burstEmitter[1]->setRelCoor(0, -0.7, 0);
    157146  this->burstEmitter[1]->setRelDir(Quaternion(-M_PI_2, Vector(0,0,1)));
    158   this->burstEmitter[1]->setName("TurbineHover_Burst_emitter_Right");
     147  this->burstEmitter[1]->setName("Cruizer_Burst_emitter_Right");
    159148
    160149
     
    211200  this->getWeaponManager().getFixedTarget()->setParent(&this->cameraNode);
    212201  this->getWeaponManager().getFixedTarget()->setRelCoor(1000,0,0);
    213  
     202
    214203  registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) );
    215204  registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) );
     
    224213
    225214/**
    226  * @brief loads the Settings of a TurbineHover from an XML-element.
     215 * @brief loads the Settings of a Cruizer from an XML-element.
    227216 * @param root the XML-element to load the Spaceship's properties from
    228217 */
    229 void TurbineHover::loadParams(const TiXmlElement* root)
     218void Cruizer::loadParams(const TiXmlElement* root)
    230219{
    231220  Playable::loadParams(root);
    232221}
    233222
    234 void TurbineHover::setPlayDirection(const Quaternion& rot, float speed)
     223void Cruizer::setPlayDirection(const Quaternion& rot, float speed)
    235224{
    236225  this->direction = Quaternion (rot.getHeading(), Vector(0,1,0));
    237226}
    238227
    239 void TurbineHover::enter()
     228void Cruizer::enter()
    240229{
    241230  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( true);
     
    249238}
    250239
    251 void TurbineHover::leave()
     240void Cruizer::leave()
    252241{
    253242  dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
     
    258247
    259248/**
    260  * @brief effect that occurs after the TurbineHover is spawned
     249 * @brief effect that occurs after the Cruizer is spawned
    261250*/
    262 void TurbineHover::postSpawn ()
     251void Cruizer::postSpawn ()
    263252{
    264253  //setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
     
    266255
    267256/**
    268  * @brief the action occuring if the turbine_hover left the game
     257 * @brief the action occuring if the cruizer left the game
    269258*/
    270 void TurbineHover::leftWorld ()
     259void Cruizer::leftWorld ()
    271260{}
    272261
     
    277266 * Implement behaviour like damage application or other miscellaneous collision stuff in this function
    278267 */
    279 void TurbineHover::collidesWith(WorldEntity* entity, const Vector& location)
     268void Cruizer::collidesWith(WorldEntity* entity, const Vector& location)
    280269{
    281270  Playable::collidesWith(entity, location);
     
    288277 * @param time The timespan passed since last update
    289278*/
    290 void TurbineHover::tick (float dt)
     279void Cruizer::tick (float dt)
    291280{
    292281  //  this->debugNode(1);
     
    306295 * @param time the timeslice since the last frame
    307296*/
    308 void TurbineHover::movement (float dt)
     297void Cruizer::movement (float dt)
    309298{
    310299  Vector accel(0.0, 0.0, 0.0);
     
    433422
    434423
    435 void TurbineHover::draw() const
     424void Cruizer::draw() const
    436425{
    437426  Vector tmpRot;
     
    486475 * @todo switch statement ??
    487476 */
    488 void TurbineHover::process(const Event &event)
     477void Cruizer::process(const Event &event)
    489478{
    490479  Playable::process(event);
  • branches/single_player_map/src/world_entities/space_ships/cruizer.h

    r9036 r9039  
    11
    22/*!
    3  * @file turbine_hover.h
    4  * Implements the Control of a TurbineHover
     3 * @file cruizer.h
     4 * Implements the Control of a Cruizer
    55 */
    66
    7 #ifndef _TURBINE_HOVER_H
    8 #define _TURBINE_HOVER_H
     7#ifndef _CRUIZER_H
     8#define _CRUIZER_H
    99
    1010#include "playable.h"
     
    1414class ParticleSystem;
    1515
    16 class TurbineHover : public Playable
     16class Cruizer : public Playable
    1717{
    1818  public:
    19     TurbineHover(const std::string& fileName);
    20     TurbineHover(const TiXmlElement* root = NULL);
    21     virtual ~TurbineHover();
     19    Cruizer(const std::string& fileName);
     20    Cruizer(const TiXmlElement* root = NULL);
     21    virtual ~Cruizer();
    2222
    2323    virtual void loadParams(const TiXmlElement* root);
     
    5959    float                 rotation;
    6060
    61    // Vector                velocity;           //!< the velocity of the TurbineHover.
    62     Quaternion            direction;          //!< the direction of the TurbineHover.
     61   // Vector                velocity;           //!< the velocity of the Cruizer.
     62    Quaternion            direction;          //!< the direction of the Cruizer.
    6363    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
    64     float                 acceleration;       //!< the acceleration of the TurbineHover.
     64    float                 acceleration;       //!< the acceleration of the Cruizer.
    6565    float                 airFriction;        //!< AirFriction.
    6666
     
    7474};
    7575
    76 #endif /* _TURBINE_HOVERS_H */
     76#endif /* _CRUIZERS_H */
Note: See TracChangeset for help on using the changeset viewer.