summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 86dd5148..685ff10c 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -469,12 +469,34 @@ void ClientTimerActions( gentity_t *ent, int msec )
client->ps.stats[ STAT_STAMINA ] = 1000;
}
+ //client is poisoned
if( client->ps.stats[ STAT_STATE ] & SS_POISONED )
{
int damage = ( level.time - client->lastPoisonTime ) / 100;
G_Damage( ent, NULL, NULL, NULL, NULL, damage, 0, MOD_VENOM );
}
+
+ //client is charging up for a pounce
+ if( client->ps.weapon == WP_POUNCE )
+ {
+ if( client->ps.stats[ STAT_MISC ] < MAX_POUNCE_SPEED && ucmd->buttons & BUTTON_ATTACK2 )
+ {
+ client->ps.stats[ STAT_MISC ] += ( 100.0f / POUNCE_TIME ) * MAX_POUNCE_SPEED;
+ client->allowedToPounce = qtrue;
+ }
+
+ if( !( ucmd->buttons & BUTTON_ATTACK2 ) )
+ {
+ if( client->ps.stats[ STAT_MISC ] > 0 )
+ client->pouncePayload = client->ps.stats[ STAT_MISC ];
+
+ client->ps.stats[ STAT_MISC ] = 0;
+ }
+
+ if( client->ps.stats[ STAT_MISC ] > MAX_POUNCE_SPEED )
+ client->ps.stats[ STAT_MISC ] = MAX_POUNCE_SPEED;
+ }
}
while( client->time1000 >= 1000 )
@@ -770,6 +792,10 @@ void ClientThink_real( gentity_t *ent ) {
// set speed
client->ps.speed = g_speed.value * BG_FindSpeedForClass( client->ps.stats[ STAT_PCLASS ] );
+ //TA: slow player if charging up for a pounce
+ if( client->ps.weapon == WP_POUNCE && ucmd->buttons & BUTTON_ATTACK2 )
+ client->ps.speed *= 0.75;
+
//TA: slow player if standing in creep
for ( i = 1, creepNode = g_entities + i; i < level.num_entities; i++, creepNode++ )
{
@@ -858,6 +884,10 @@ void ClientThink_real( gentity_t *ent ) {
}
break;
+ case WP_POUNCE:
+ pm.autoWeaponHit[ WP_POUNCE ] = CheckPounceAttack( ent );
+ break;
+
default:
break;
}