--- a/src/Weapon.hh Mon Dec 08 01:31:09 2008 +0000
+++ b/src/Weapon.hh Mon Dec 08 01:38:43 2008 +0000
@@ -62,11 +62,16 @@
*/
int reloadTimer;
+ /**
+ * If nonzero, projectiles bounce off walls (it's the elasticity factor), else they explode on contact
+ */
+ float bounce;
+
public:
/**
* Create a weapon with the given parameters
*/
- Weapon (WeaponID id, TickCount expire, float velocity, float recoil, float explosionRadius, float radius, TimeMS reloadTime, std::string name);
+ Weapon (WeaponID id, TickCount expire, float velocity, float recoil, float explosionRadius, float radius, TimeMS reloadTime, std::string name, float bounce);
/**
* Decrement the reload timer, if it's still going
@@ -88,6 +93,7 @@
float getExplosionRadius (void) const { return explosionRadius; }
float getRadius (void) const { return radius; }
TickCount getExpire (void) const { return expire; }
+ float getBounce (void) const { return bounce; }
/**
* Start reloading