Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2007, 3:05:01 AM (17 years ago)
Author:
patrick
Message:

merged playability. but got strange bug

Location:
branches/playability.new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability.new

    • Property svn:ignore
      •  

        old new  
        1010autom4te.cache
        1111aclocal.m4
         12tags
         13test.bmp
         14config.sub
         15config.guess
         16OrxonoxPlayability.kdevses
         17OrxonoxPlayability.kdevelop.pcs
  • branches/playability.new/src/world_entities/weapons/weapon.h

    r9869 r10362  
    126126
    127127    // EMISSION
     128    /** keeping old functions*/
     129    void setEmissionPoint(const Vector& point, int barrel);
    128130    void setEmissionPoint(const Vector& point);
    129131    /** @see void setEmissionPoint(const Vector& point); */
     132    inline void setEmissionPoint(float x, float y, float z, int barrel) { this->setEmissionPoint(Vector(x, y, z), barrel); };
    130133    inline void setEmissionPoint(float x, float y, float z) { this->setEmissionPoint(Vector(x, y, z)); };
    131134    /** @returns the absolute Position of the EmissionPoint */
    132     inline const Vector& getEmissionPoint() const { return this->emissionPoint.getAbsCoor(); };
     135    inline const Vector& getEmissionPoint(int barrel) const { return this->emissionPoint[barrel]->getAbsCoor(); };
     136    inline const Vector& getEmissionPoint() const { return this->emissionPoint[0]->getAbsCoor(); };
     137
    133138
    134139    inline void setDefaultTarget(PNode* defaultTarget) { this->defaultTarget = defaultTarget; };
     
    158163
    159164    Animation3D* getAnimation(WeaponState state, PNode* node = NULL);
     165    Animation3D* getAnimation(int barrel, int seg, PNode* node);
    160166    Animation3D* copyAnimation(WeaponState from, WeaponState to);
    161167
     
    169175    bool check() const;
    170176    void debug() const;
     177
     178    inline int getBarrels() {return this->barrels; };
     179    inline int getSegs() { return this->segs; };
     180    inline void setBarrels(int barrels) { this->barrels = barrels; };
     181    inline void setSegs(int segs) { this->segs = segs; };
     182
     183    inline Animation3D* getShootAnim(int barrel, int seg) { return this->shootAnim[barrel][seg]; };
     184    inline void setShootAnim(int barrel, int seg, PNode* component) { this->shootAnim[barrel][seg] = this->getAnimation(barrel, seg, component); };
     185
     186    void init2();
     187    void deconstr();
    171188
    172189  protected:
     
    184201    static WeaponState   charToState(const std::string& state);
    185202    static const char*   stateToChar(WeaponState state);
     203
     204
    186205
    187206  private:
     
    214233    float                maxCharge;                        //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled)
    215234
    216     OrxGui::GLGuiEnergyWidget* energyWidget;
     235    OrxGui::GLGuiEnergyWidgetVertical* energyWidget;
    217236
    218237    PNode*               defaultTarget;                    //!< A target for targeting Weapons.
     
    230249    OrxSound::SoundBuffer  soundBuffers[WA_ACTION_COUNT];   //!< SoundBuffers for all actions @see WeaponAction.
    231250
    232     PNode                  emissionPoint;                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
     251    PNode**                emissionPoint;                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
    233252
    234253    bool                   hideInactive;                    //!< Hides the Weapon if it is inactive
     
    237256    ClassID                projectile;                      //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.)
    238257    FastFactory*           projectileFactory;               //!< A factory, that produces and handles the projectiles.
     258
     259    int                    barrels;                         //!< # of barrels
     260    int                    segs;                             //!< # of segments, one barrel has
     261    Animation3D***         shootAnim;
     262
    239263  };
    240264
Note: See TracChangeset for help on using the changeset viewer.