summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/g_missile.c11
-rw-r--r--src/game/tremulous.h6
2 files changed, 13 insertions, 4 deletions
diff --git a/src/game/g_missile.c b/src/game/g_missile.c
index 9e9a76e5..81f8268f 100644
--- a/src/game/g_missile.c
+++ b/src/game/g_missile.c
@@ -438,6 +438,7 @@ gentity_t *fire_luciferCannon( gentity_t *self, vec3_t start, vec3_t dir,
int damage, int radius, int speed )
{
gentity_t *bolt;
+ float charge;
VectorNormalize( dir );
@@ -464,9 +465,15 @@ gentity_t *fire_luciferCannon( gentity_t *self, vec3_t start, vec3_t dir,
bolt->clipmask = MASK_SHOT;
bolt->target_ent = NULL;
+ // Give the missile a small bounding box
+ charge = (float)( damage - LCANNON_SECONDARY_DAMAGE ) / LCANNON_DAMAGE;
+ bolt->r.mins[ 0 ] = bolt->r.mins[ 1 ] = bolt->r.mins[ 2 ] =
+ -LCANNON_SECONDARY_SIZE - charge * LCANNON_SIZE;
+ bolt->r.maxs[ 0 ] = bolt->r.maxs[ 1 ] = bolt->r.maxs[ 2 ] =
+ -bolt->r.mins[ 0 ];
+
// Pass the missile charge through
- bolt->s.torsoAnim = ( damage - LCANNON_SECONDARY_DAMAGE ) *
- 255 / LCANNON_DAMAGE;
+ bolt->s.torsoAnim = charge * 255;
if( bolt->s.torsoAnim < 0 )
bolt->s.torsoAnim = 0;
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 30ea1d2f..b243f69c 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -457,9 +457,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LCANNON_REPEAT 500
#define LCANNON_RELOAD 0
#define LCANNON_DAMAGE HDM(265)
-#define LCANNON_RADIUS 150
+#define LCANNON_RADIUS 150 // primary splash damage radius
+#define LCANNON_SIZE 10 // bounding box radius for full charge
#define LCANNON_SECONDARY_DAMAGE HDM(30)
-#define LCANNON_SECONDARY_RADIUS 75
+#define LCANNON_SECONDARY_RADIUS 75 // secondary splash damage radius
+#define LCANNON_SECONDARY_SIZE 3 // bounding box radius
#define LCANNON_SECONDARY_SPEED 1400
#define LCANNON_SECONDARY_RELOAD 2000
#define LCANNON_SECONDARY_REPEAT 1000