Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 6, 2014, 11:07:07 AM (11 years ago)
Author:
muemart
Message:

Move everything back to the Turret class, set the correct team, and (re)arm the turret. Also, hide it from the radar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/turretFS14/src/modules/objects/Turret.h

    r10039 r10044  
    5050            virtual void rotateYaw(const Vector2& value);
    5151            virtual void rotateRoll(const Vector2& value);
     52            virtual bool isInRange(const Vector3 &position);
     53            virtual void aimAtPosition(const Vector3 &position);
    5254
    5355            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5456            virtual void tick(float dt);
    5557
     58            inline void setAttackRadius(float radius)
     59                { this->attackRadius_ = radius; }
     60
     61            inline void setMaxPitch(float pitch)
     62                { this->maxPitch_ = pitch; }
     63
     64            inline void setMaxYaw(float yaw)
     65                { this->maxYaw_ = yaw; }
     66
     67            inline float getAttackRadius() const
     68                { return this->attackRadius_; }               
     69
     70            inline float getMaxPitch() const
     71                { return this->maxPitch_; }
     72
     73            inline float getMaxYaw() const
     74                { return this->maxYaw_; }
     75
     76        protected:
     77            Vector3 startDir_;
     78            Vector3 localZ_;
     79            Vector3 localZStart_;
     80            Vector3 localY_;
     81            Vector3 localYStart_;
     82            Vector3 localX_;
     83            Vector3 localXStart_;           
    5684
    5785        private:
     86            bool once_;
     87
     88            float attackRadius_;
     89            Ogre::Real maxPitch_;
     90            Ogre::Real maxYaw_;
    5891            float rotationThrust_;
    5992
    60             btVector3 localAngularAcceleration_;
     93            Quaternion rotation_;
    6194    };
    6295}
Note: See TracChangeset for help on using the changeset viewer.