src/Weapon.hh
changeset 423 947ab54de4b7
parent 338 fe2b3c6fff54
equal deleted inserted replaced
422:5e4c8631779e 423:947ab54de4b7
    66      * How many ticks projectiles last
    66      * How many ticks projectiles last
    67      */
    67      */
    68     TickCount expire;
    68     TickCount expire;
    69 
    69 
    70     /**
    70     /**
    71      * current reload state
    71      * Remaining reload time
    72      */
    72      */
    73     int reloadTimer;
    73     TimeMS reloadTimer;
    74 
    74 
    75     /**
    75     /**
    76      * If nonzero, projectiles bounce off walls (it's the elasticity factor), else they explode on contact
    76      * If nonzero, projectiles bounce off walls (it's the elasticity factor), else they explode on contact
    77      */
    77      */
    78     float bounce;
    78     float bounce;
   104     WeaponID getID (void) const { return id; }
   104     WeaponID getID (void) const { return id; }
   105     std::string getName (void) const { return name; }
   105     std::string getName (void) const { return name; }
   106     float getSpeed (void) const { return velocity; }
   106     float getSpeed (void) const { return velocity; }
   107     float getRecoil (void) const { return recoil; }
   107     float getRecoil (void) const { return recoil; }
   108     float getExplosionRadius (void) const { return explosionRadius; }
   108     float getExplosionRadius (void) const { return explosionRadius; }
   109     int getDamage (void) const { return damage; }
   109     
       
   110     // XXX: int -> Health
       
   111     Health getDamage (void) const { return (Health) damage; }
   110     float getRadius (void) const { return radius; }
   112     float getRadius (void) const { return radius; }
   111     TickCount getExpire (void) const { return expire; }
   113     TickCount getExpire (void) const { return expire; }
   112     float getBounce (void) const { return bounce; }
   114     float getBounce (void) const { return bounce; }
   113     float getMass (void) const { return mass; }
   115     float getMass (void) const { return mass; }
   114 
   116     
   115     int getReloadTimer(void) const { return reloadTimer; }
   117     // XXX: remove one of these
   116     int getReloadTime(void) const { return reloadTime; }
   118     TimeMS getReloadTimer(void) const { return reloadTimer; }
       
   119     TimeMS getReloadTime(void) const { return reloadTime; }
   117     
   120     
   118     /**
   121     /**
   119      * Start reloading
   122      * Start reloading
   120      */
   123      */
   121     void reload (void);
   124     void reload (void);