Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 2, 2007, 3:57:53 PM (17 years ago)
Author:
nicolasc
Message:

some minor cleanup

Location:
branches/presentation/src/world_entities/weapons
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/weapons/disruptor.cc

    r10771 r10772  
    9292  this->setEmissionPoint(Vector(1.672, 0.0, 0.0) * this->getScaling());
    9393
    94   this->getShootAnim(0, 0)->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);
    95   this->getShootAnim(0, 0)->addKeyFrame(Vector(-0.5, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.2, ANIM_LINEAR, ANIM_NULL);
     94  this->getShootAnim(0, 0)->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.033, ANIM_LINEAR, ANIM_NULL);
     95  this->getShootAnim(0, 0)->addKeyFrame(Vector(-0.5, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.3, ANIM_LINEAR, ANIM_NULL);
    9696//   this->shootAnim[0][0]->addKeyFrame(Vector(0.0, 0.0, 0.0) * this->getScaling(), Quaternion(), 0.1, ANIM_LINEAR, ANIM_NULL);
    9797
  • branches/presentation/src/world_entities/weapons/light_blaster.cc

    r10771 r10772  
    8484
    8585  this->setBarrels(3);
    86   this->setSegs(1); //could be left out
     86//   this->setSegs(1); //could be left out
    8787
    8888  this->setEmissionPoint(Vector(2.2, 0.0, 0.1), 0);
  • branches/presentation/src/world_entities/weapons/nadion_laser.cc

    r10771 r10772  
    8686
    8787
    88   this->setBarrels(1); // could be left out
    89   this->setSegs(1);    // could be left out
     88//   this->setBarrels(1); // could be left out
     89//   this->setSegs(1);    // could be left out
    9090
    9191  this->setEmissionPoint(Vector(1.680, 0.0, 0.0) * this->getScaling());
  • branches/presentation/src/world_entities/weapons/rf_cannon.cc

    r10771 r10772  
    8585
    8686  this->setBarrels(4);
    87   this->setSegs(1);
     87//   this->setSegs(1);
    8888  this->setActiveBarrel(rand() % 4);
    8989
  • branches/presentation/src/world_entities/weapons/weapon.cc

    r10771 r10772  
    1212### File Specific
    1313   main-programmer: Patrick Boenzli
    14    co-programmer: Benjamin Grauer
     14   co-programmer: Benjamin Grauer, Nicolas Schlumberger
    1515
    1616   2005-07-15: Benjamin Grauer: restructurating the entire Class
     
    6363    delete this->soundSource;
    6464
     65//!< PNode must not be deleted, gc takes care of.
    6566//   for (int i = 0; i < MAX_BARRELS; i++)
    6667//   {
     
    132133
    133134  this->barrels = 1;  // just to have an initial value
    134   this->segs = 1;
    135   this->activeBarrel = 0;
     135  this->segs = 0;     // by default there are no movable parts
     136  this->activeBarrel = 0; //array wize, 0 means first barrel
    136137
    137138  this->preferedSide = -1;
     
    163164  this->maxCharge = 1.0;                           //< The maximum charge is also one unit.
    164165
    165   this->energy = 10.0;                               //< The secondary Buffer (before we have to reload)
     166  this->energy = 10.0;                             //< The secondary Buffer (before we have to reload)
    166167  this->energyMax = 10.0;                          //< How much energy can be carried
    167168  this->capability = WTYPE_ALL;                    //< The Weapon has all capabilities @see W_Capability.
    168169
    169170  this->energyWidget = NULL;
    170   isEnergyWidgetInitialized = false;
     171  isEnergyWidgetInitialized = false;               // FIXME, needs to be cleaned
    171172
    172173  // set this object to be synchronized over network
  • branches/presentation/src/world_entities/weapons/weapon.h

    r10771 r10772  
    193193
    194194    Animation3D* getShootAnim(int barrel, int seg) { return this->shootAnim[barrel][seg]; };
    195 //     void setShootAnim(int barrel, int seg, PNode* component) { this->shootAnim[barrel][seg] = this->getAnimation(barrel, seg, component); };
    196 
    197 //     void init2();
    198 //     void deconstr();
    199195
    200196    inline int getPreferedSide() { return this->preferedSide; }
     
    203199    inline void setEnergyWidgetInitialized(bool b) {this->isEnergyWidgetInitialized = b;};
    204200
     201    //some functions for conveneance
    205202    inline const Vector& getObjComp(int barrel, int seg) const { return this->objComp[barrel][seg]->getAbsCoor(); };
    206203    inline const float getObjCompx(int barrel, int seg) const { return this->objComp[barrel][seg]->getAbsCoor().x; };
     
    259256    float                maxCharge;                        //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled)
    260257
    261     //OrxGui::GLGuiEnergyWidgetVertical* energyWidget;
    262 
    263258    PNode*               defaultTarget;                    //!< A target for targeting Weapons.
    264259
     
    277272    OrxSound::SoundBuffer  soundBuffers[WA_ACTION_COUNT];   //!< SoundBuffers for all actions @see WeaponAction.
    278273
    279     PNode*                 emissionPoint[MAX_BARRELS];                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
     274    PNode*                 emissionPoint[MAX_BARRELS];      //!< The point, where the projectiles are emitted.
    280275
    281276    bool                   hideInactive;                    //!< Hides the Weapon if it is inactive
     
    287282    int                    barrels;                         //!< # of barrels (max 4)
    288283    int                    segs;                            //!< # of segments, one barrel has (max 3)
    289     int                    activeBarrel;
     284    int                    activeBarrel;                    //!< set # of active barrel, count array wise (aka. 0 is the first)
    290285    Animation3D*           shootAnim[MAX_BARRELS][MAX_SEGMENTS];
    291286    PNode*                 objComp[MAX_BARRELS][MAX_SEGMENTS];
Note: See TracChangeset for help on using the changeset viewer.