summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorAsa Kravets <norfenstein@gmail.com>2009-10-03 13:08:41 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:30 +0000
commit72d2d6158fa5c0d2a9aa484da4a0e7e6739f358c (patch)
tree27bdb4f855eeddac28f080221b3954f15d43e1c6 /src/game
parentfbda8e4713d1f600ebf96ede3dfa63591159007f (diff)
Readjusted attack ranges for upgraded classes to compensate for model size differences
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_weapon.c11
-rw-r--r--src/game/tremulous.h7
2 files changed, 13 insertions, 5 deletions
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 9749bec1..8a8c0e1b 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -973,7 +973,10 @@ void CheckGrabAttack( gentity_t *ent )
CalcMuzzlePoint( ent, forward, right, up, muzzle );
- VectorMA( muzzle, LEVEL1_GRAB_RANGE, forward, end );
+ if( ent->client->ps.weapon == WP_ALEVEL1 )
+ VectorMA( muzzle, LEVEL1_GRAB_RANGE, forward, end );
+ else if( ent->client->ps.weapon == WP_ALEVEL1_UPG )
+ VectorMA( muzzle, LEVEL1_GRAB_U_RANGE, forward, end );
trap_Trace( &tr, muzzle, NULL, NULL, end, ent->s.number, MASK_SHOT );
if( tr.surfaceFlags & SURF_NOIMPACT )
@@ -1568,9 +1571,11 @@ void FireWeapon( gentity_t *ent )
switch( ent->s.weapon )
{
case WP_ALEVEL1:
- case WP_ALEVEL1_UPG:
meleeAttack( ent, LEVEL1_CLAW_RANGE, LEVEL1_CLAW_WIDTH, LEVEL1_CLAW_WIDTH,
LEVEL1_CLAW_DMG, MOD_LEVEL1_CLAW );
+ case WP_ALEVEL1_UPG:
+ meleeAttack( ent, LEVEL1_CLAW_U_RANGE, LEVEL1_CLAW_WIDTH, LEVEL1_CLAW_WIDTH,
+ LEVEL1_CLAW_DMG, MOD_LEVEL1_CLAW );
break;
case WP_ALEVEL3:
meleeAttack( ent, LEVEL3_CLAW_RANGE, LEVEL3_CLAW_WIDTH, LEVEL3_CLAW_WIDTH,
@@ -1581,7 +1586,7 @@ void FireWeapon( gentity_t *ent )
LEVEL3_CLAW_WIDTH, LEVEL3_CLAW_DMG, MOD_LEVEL3_CLAW );
break;
case WP_ALEVEL2:
- meleeAttack( ent, LEVEL2_CLAW_RANGE, LEVEL2_CLAW_WIDTH, LEVEL2_CLAW_WIDTH,
+ meleeAttack( ent, LEVEL2_CLAW_U_RANGE, LEVEL2_CLAW_WIDTH, LEVEL2_CLAW_WIDTH,
LEVEL2_CLAW_DMG, MOD_LEVEL2_CLAW );
break;
case WP_ALEVEL2_UPG:
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 465f56c3..04ea59f0 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -55,12 +55,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL1_CLAW_DMG ADM(32)
#define LEVEL1_CLAW_RANGE 64.0f
+#define LEVEL1_CLAW_U_RANGE LEVEL1_CLAW_RANGE + 3.0f
#define LEVEL1_CLAW_WIDTH 10.0f
#define LEVEL1_CLAW_REPEAT 600
#define LEVEL1_CLAW_U_REPEAT 500
#define LEVEL1_CLAW_K_SCALE 1.0f
#define LEVEL1_CLAW_U_K_SCALE 1.0f
#define LEVEL1_GRAB_RANGE 96.0f
+#define LEVEL1_GRAB_U_RANGE LEVEL1_GRAB_RANGE + 3.0f
#define LEVEL1_GRAB_TIME 300
#define LEVEL1_GRAB_U_TIME 300
#define LEVEL1_PCLOUD_DMG ADM(4)
@@ -72,6 +74,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL2_CLAW_DMG ADM(40)
#define LEVEL2_CLAW_RANGE 80.0f
+#define LEVEL2_CLAW_U_RANGE LEVEL2_CLAW_RANGE + 2.0f
#define LEVEL2_CLAW_WIDTH 14.0f
#define LEVEL2_CLAW_REPEAT 500
#define LEVEL2_CLAW_K_SCALE 1.0f
@@ -87,7 +90,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL3_CLAW_DMG ADM(80)
#define LEVEL3_CLAW_RANGE 72.0f
-#define LEVEL3_CLAW_UPG_RANGE LEVEL3_CLAW_RANGE + 6.0f
+#define LEVEL3_CLAW_UPG_RANGE LEVEL3_CLAW_RANGE + 3.0f
#define LEVEL3_CLAW_WIDTH 12.0f
#define LEVEL3_CLAW_REPEAT 700
#define LEVEL3_CLAW_K_SCALE 1.0f
@@ -95,7 +98,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define LEVEL3_CLAW_U_K_SCALE 1.0f
#define LEVEL3_POUNCE_DMG ADM(100)
#define LEVEL3_POUNCE_RANGE 54.0f
-#define LEVEL3_POUNCE_UPG_RANGE LEVEL3_POUNCE_RANGE + 6.0f
+#define LEVEL3_POUNCE_UPG_RANGE LEVEL3_POUNCE_RANGE + 3.0f
#define LEVEL3_POUNCE_WIDTH 14.0f
#define LEVEL3_POUNCE_TIME 700 // msec for full Dragoon pounce
#define LEVEL3_POUNCE_TIME_UPG 700 // msec for full Adv. Dragoon pounce