Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7092 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Feb 7, 2006, 5:27:54 PM (19 years ago)
Author:
bensch
Message:

absDir

Location:
trunk/src/world_entities
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/creatures/md2_creature.h

    r6804 r7092  
    2424
    2525    virtual void loadParams(const TiXmlElement* root);
     26    virtual void setAbsDirPlay(const Quaternion& rot) {/* FIXME */};
    2627
    2728    virtual void enter();
  • trunk/src/world_entities/playable.cc

    r7091 r7092  
    2121#include "player.h"
    2222#include "state.h"
     23#include "load_param.h"
    2324
    2425#include "world_entities/projectiles/projectile.h"
     
    8283}
    8384
     85
     86void Playable::loadParams(const TiXmlElement* root)
     87{
     88  WorldEntity::loadParams(root);
     89
     90  LoadParam(root, "abs-dir", this, Playable, setAbsDirPlay);
     91}
    8492
    8593void Playable::addWeapon(Weapon* weapon, int configID, int slotID)
  • trunk/src/world_entities/playable.h

    r7072 r7092  
    2828    virtual ~Playable();
    2929
     30    virtual void loadParams(const TiXmlElement* root);
    3031
    3132    virtual void die();
     
    6162    bool      needsReadSync();
    6263
     64
     65    virtual void setAbsDirPlay(const Quaternion& rot) = 0;
     66    void setAbsDirPlay(float angle, float dirX, float dirY, float dirZ) { this->setAbsDirPlay(Quaternion(angle, Vector(dirX, dirY, dirZ))); }
     67
    6368    inline void setScore( int score ) { this->score = score; }
    6469    inline int  getScore() { return this->score; }
  • trunk/src/world_entities/space_ships/helicopter.h

    r6947 r7092  
    2222
    2323    virtual void loadParams(const TiXmlElement* root);
     24    virtual void setAbsDirPlay(const Quaternion& rot){/* FIXME */};
    2425
    2526    virtual void enter();
  • trunk/src/world_entities/space_ships/hover.h

    r7072 r7092  
    1919
    2020    virtual void loadParams(const TiXmlElement* root);
     21    virtual void setAbsDirPlay(const Quaternion& rot) {/* FIXME */};
    2122
    2223    virtual void enter();
  • trunk/src/world_entities/space_ships/space_ship.cc

    r7087 r7092  
    248248{
    249249  Playable::loadParams(root);
    250 
    251   LoadParam(root, "abs-dir", this, SpaceShip, setRelDir);
    252 }
    253 
    254 void SpaceShip::setRelDir(float angle, float axisX, float axisY, float axisZ)
    255 {
    256   this->mouseDir = Quaternion(angle, Vector(axisX, axisY, axisZ));
     250}
     251
     252void SpaceShip::setAbsDirPlay(const Quaternion& quat)
     253{
     254  this->mouseDir = Quaternion(quat);
    257255}
    258256
  • trunk/src/world_entities/space_ships/space_ship.h

    r7085 r7092  
    2727    virtual void loadParams(const TiXmlElement* root);
    2828
    29     void setRelDir(float angle, float axisX, float axisY, float axisZ);
     29    virtual void setAbsDirPlay(const Quaternion& rot);
    3030
    3131    virtual void enter();
  • trunk/src/world_entities/space_ships/turbine_hover.h

    r7001 r7092  
    2323
    2424    virtual void loadParams(const TiXmlElement* root);
    25 
     25    virtual void setAbsDirPlay(const Quaternion& rot) {/* FIXME */};
    2626    virtual void enter();
    2727    virtual void leave();
Note: See TracChangeset for help on using the changeset viewer.