summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-12-08 19:25:25 +0000
committerTim Angus <tim@ngus.net>2005-12-08 19:25:25 +0000
commit10107e224bbaa2a39cd1296905d27e4d927cf207 (patch)
tree02c7175e4994c75951ca6e22a4d6ca0716a4af76 /src/game
parent6bd236bb4e5c59e8f767188c11d205383acafe63 (diff)
* Reduced Dragoon pounce range to 64 from 96
* Dragoon pounce now incurs 400ms wait before other weapons may be used * Trapper cost down to 8 from 10 * Hovel is now free, but only one can be built * Teslagen damage up to 9 from 7 * Non locational damage does not apply locational armour anymore; instead it averages the armour regions together * Tweaks to pain blends * Added cg_animation.c, which apparently I forgot * Added generate-infopanes.sh and infopanes.def.h
Diffstat (limited to 'src/game')
-rw-r--r--src/game/bg_misc.c2
-rw-r--r--src/game/bg_public.h1
-rw-r--r--src/game/g_active.c2
-rw-r--r--src/game/g_buildable.c22
-rw-r--r--src/game/g_combat.c72
-rw-r--r--src/game/g_local.h1
-rw-r--r--src/game/g_weapon.c4
-rw-r--r--src/game/tremulous.h11
8 files changed, 81 insertions, 34 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 4fc2ffc0..727190af 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -304,7 +304,7 @@ buildableAttributes_t bg_buildableList[ ] =
qtrue, //qboolean creepTest;
HOVEL_CREEPSIZE, //int creepSize;
qfalse, //qboolean dccTest;
- qfalse //qboolean reactorTest;
+ qtrue //qboolean reactorTest;
},
{
BA_H_SPAWN, //int buildNum;
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 25f5a90d..fa84b440 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -593,6 +593,7 @@ typedef enum
MN_A_NOOVMND,
MN_A_NOROOM,
MN_A_NORMAL,
+ MN_A_HOVEL,
MN_A_HOVEL_EXIT,
//human stuff
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 54ae33e8..fc66ccff 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -521,7 +521,7 @@ void ClientTimerActions( gentity_t *ent, int msec )
pounceSpeed = LEVEL3_POUNCE_UPG_SPEED;
if( client->ps.stats[ STAT_MISC ] < pounceSpeed && ucmd->buttons & BUTTON_ATTACK2 )
- client->ps.stats[ STAT_MISC ] += ( 100.0f / (float)LEVEL3_POUNCE_TIME ) * pounceSpeed;
+ client->ps.stats[ STAT_MISC ] += ( 100.0f / (float)LEVEL3_POUNCE_CHARGE_TIME ) * pounceSpeed;
if( !( ucmd->buttons & BUTTON_ATTACK2 ) )
{
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 5d014a22..083e0662 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2508,9 +2508,23 @@ itemBuildError_t G_itemFits( gentity_t *ent, buildable_t buildable, int distance
if( tempent->s.eType != ET_BUILDABLE )
continue;
- if( tempent->s.modelindex == BA_A_OVERMIND )
+ if( tempent->s.modelindex == buildable )
{
- reason = IBE_OVERMIND;
+ switch( buildable )
+ {
+ case BA_A_OVERMIND:
+ reason = IBE_OVERMIND;
+ break;
+
+ case BA_A_HOVEL:
+ reason = IBE_HOVEL;
+ break;
+
+ default:
+ Com_Error( ERR_FATAL, "No reason for denying build of %d\n", buildable );
+ break;
+ }
+
break;
}
}
@@ -2832,6 +2846,10 @@ qboolean G_ValidateBuild( gentity_t *ent, buildable_t buildable )
G_TriggerMenu( ent->client->ps.clientNum, MN_A_OVERMIND );
return qfalse;
+ case IBE_HOVEL:
+ G_TriggerMenu( ent->client->ps.clientNum, MN_A_HOVEL );
+ return qfalse;
+
case IBE_HOVELEXIT:
G_TriggerMenu( ent->client->ps.clientNum, MN_A_HOVEL_EXIT );
return qfalse;
diff --git a/src/game/g_combat.c b/src/game/g_combat.c
index e869c046..d98f74c3 100644
--- a/src/game/g_combat.c
+++ b/src/game/g_combat.c
@@ -718,7 +718,29 @@ static float G_CalcDamageModifier( vec3_t point, gentity_t *targ, gentity_t *att
hitRotation = hitRotation % 360; // Keep it in the 0-359 range
- if( !( dflags & DAMAGE_NO_LOCDAMAGE ) )
+ if( dflags & DAMAGE_NO_LOCDAMAGE )
+ {
+ for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ )
+ {
+ float totalModifier = 0.0f;
+ float averageModifier = 1.0f;
+
+ //average all of this upgrade's armour regions together
+ if( BG_InventoryContainsUpgrade( i, targ->client->ps.stats ) )
+ {
+ for( j = 0; j < g_numArmourRegions[ i ]; j++ )
+ totalModifier += g_armourRegions[ i ][ j ].modifier;
+
+ if( g_numArmourRegions[ i ] )
+ averageModifier = totalModifier / g_numArmourRegions[ i ];
+ else
+ averageModifier = 1.0f;
+ }
+
+ modifier *= averageModifier;
+ }
+ }
+ else
{
for( i = 0; i < g_numDamageRegions[ class ]; i++ )
{
@@ -744,35 +766,35 @@ static float G_CalcDamageModifier( vec3_t point, gentity_t *targ, gentity_t *att
( targ->client->ps.pm_flags & PMF_DUCKED ) ) )
modifier *= g_damageRegions[ class ][ i ].modifier;
}
- }
- for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ )
- {
- if( BG_InventoryContainsUpgrade( i, targ->client->ps.stats ) )
+ for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ )
{
- for( j = 0; j < g_numArmourRegions[ i ]; j++ )
+ if( BG_InventoryContainsUpgrade( i, targ->client->ps.stats ) )
{
- qboolean rotationBound;
-
- if( g_armourRegions[ i ][ j ].minAngle >
- g_armourRegions[ i ][ j ].maxAngle )
- {
- rotationBound = ( hitRotation >= g_armourRegions[ i ][ j ].minAngle &&
- hitRotation <= 360 ) || ( hitRotation >= 0 &&
- hitRotation <= g_armourRegions[ i ][ j ].maxAngle );
- }
- else
+ for( j = 0; j < g_numArmourRegions[ i ]; j++ )
{
- rotationBound = ( hitRotation >= g_armourRegions[ i ][ j ].minAngle &&
- hitRotation <= g_armourRegions[ i ][ j ].maxAngle );
- }
+ qboolean rotationBound;
- if( rotationBound &&
- hitRatio >= g_armourRegions[ i ][ j ].minHeight &&
- hitRatio <= g_armourRegions[ i ][ j ].maxHeight &&
- ( g_armourRegions[ i ][ j ].crouch ==
- ( targ->client->ps.pm_flags & PMF_DUCKED ) ) )
- modifier *= g_armourRegions[ i ][ j ].modifier;
+ if( g_armourRegions[ i ][ j ].minAngle >
+ g_armourRegions[ i ][ j ].maxAngle )
+ {
+ rotationBound = ( hitRotation >= g_armourRegions[ i ][ j ].minAngle &&
+ hitRotation <= 360 ) || ( hitRotation >= 0 &&
+ hitRotation <= g_armourRegions[ i ][ j ].maxAngle );
+ }
+ else
+ {
+ rotationBound = ( hitRotation >= g_armourRegions[ i ][ j ].minAngle &&
+ hitRotation <= g_armourRegions[ i ][ j ].maxAngle );
+ }
+
+ if( rotationBound &&
+ hitRatio >= g_armourRegions[ i ][ j ].minHeight &&
+ hitRatio <= g_armourRegions[ i ][ j ].maxHeight &&
+ ( g_armourRegions[ i ][ j ].crouch ==
+ ( targ->client->ps.pm_flags & PMF_DUCKED ) ) )
+ modifier *= g_armourRegions[ i ][ j ].modifier;
+ }
}
}
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index ee8a8a57..d9997d49 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -639,6 +639,7 @@ typedef enum
IBE_NOASSERT,
IBE_SPWNWARN,
IBE_NOCREEP,
+ IBE_HOVEL,
IBE_HOVELEXIT,
IBE_REACTOR,
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 8f204ef5..a18a8c39 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1253,6 +1253,9 @@ qboolean CheckPounceAttack( gentity_t *ent )
return qfalse;
}
+ if( ent->client->ps.weaponTime )
+ return qfalse;
+
// set aiming directions
AngleVectors( ent->client->ps.viewangles, forward, right, up );
@@ -1289,6 +1292,7 @@ qboolean CheckPounceAttack( gentity_t *ent )
G_Damage( traceEnt, ent, ent, forward, tr.endpos, damage,
DAMAGE_NO_KNOCKBACK|DAMAGE_NO_LOCDAMAGE, MOD_LEVEL3_POUNCE );
+ ent->client->ps.weaponTime += LEVEL3_POUNCE_TIME;
ent->client->allowedToPounce = qfalse;
return qtrue;
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index ab9db16c..93a85ba0 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -75,12 +75,13 @@
#define LEVEL3_CLAW_REPEAT 700
#define LEVEL3_CLAW_U_REPEAT 600
#define LEVEL3_POUNCE_DMG ADM(100)
-#define LEVEL3_POUNCE_RANGE 96.0f
+#define LEVEL3_POUNCE_RANGE 64.0f
#define LEVEL3_POUNCE_WIDTH 16.0f
#define LEVEL3_POUNCE_SPEED 700
#define LEVEL3_POUNCE_UPG_SPEED 800
#define LEVEL3_POUNCE_SPEED_MOD 0.75f
-#define LEVEL3_POUNCE_TIME 700
+#define LEVEL3_POUNCE_CHARGE_TIME 700
+#define LEVEL3_POUNCE_TIME 400
#define LEVEL3_BOUNCEBALL_DMG ADM(110)
#define LEVEL3_BOUNCEBALL_REPEAT 1000
#define LEVEL3_BOUNCEBALL_SPEED 1000.0f
@@ -252,7 +253,7 @@
#define HIVE_SPEED 240.0f
#define HIVE_DIR_CHANGE_PERIOD 500
-#define TRAPPER_BP 10
+#define TRAPPER_BP 8
#define TRAPPER_BT 12000
#define TRAPPER_HEALTH ABHM(50)
#define TRAPPER_REGEN 6
@@ -275,7 +276,7 @@
#define OVERMIND_ATTACK_REPEAT 1000
#define OVERMIND_VALUE 300
-#define HOVEL_BP 8
+#define HOVEL_BP 0
#define HOVEL_BT 15000
#define HOVEL_HEALTH ABHM(375)
#define HOVEL_REGEN 20
@@ -500,7 +501,7 @@
#define TESLAGEN_SPLASHRADIUS 100
#define TESLAGEN_REPEAT 250
#define TESLAGEN_RANGE 250
-#define TESLAGEN_DMG HDM(7)
+#define TESLAGEN_DMG HDM(9)
#define DC_BP 8
#define DC_BT 10000