summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-27 02:08:28 +0000
committerTim Angus <tim@ngus.net>2003-08-27 02:08:28 +0000
commit4b492e5cbf89108d9f49981ee11e065a57914226 (patch)
tree436a3387387bf52b85c5441b19f5eb546be52511 /src/game/g_active.c
parentcaf924c83b11c0ccfe08df26935c699423116924 (diff)
* Partial mofo charge ability from centuries ago
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index 10086b41..35fa4c1f 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -484,6 +484,27 @@ void ClientTimerActions( gentity_t *ent, int msec )
client->ps.stats[ STAT_MISC ] = DRAGOON_POUNCE_SPEED;
}
+ //client is charging up for a charge
+ if( client->ps.weapon == WP_GROUND_POUND )
+ {
+ if( client->ps.stats[ STAT_MISC ] < BMOFO_CHARGE_SPEED && ucmd->buttons & BUTTON_ATTACK2 )
+ {
+ client->ps.stats[ STAT_MISC ] += ( 100.0f / (float)BMOFO_CHARGE_TIME ) * BMOFO_CHARGE_SPEED;
+ client->allowedToCharge = qtrue;
+ }
+
+ if( !( ucmd->buttons & BUTTON_ATTACK2 ) )
+ {
+ if( client->ps.stats[ STAT_MISC ] > 0 )
+ client->chargePayload = client->ps.stats[ STAT_MISC ];
+
+ client->ps.stats[ STAT_MISC ] = 0;
+ }
+
+ if( client->ps.stats[ STAT_MISC ] > BMOFO_CHARGE_SPEED )
+ client->ps.stats[ STAT_MISC ] = BMOFO_CHARGE_SPEED;
+ }
+
//client is charging up an lcannon
if( client->ps.weapon == WP_LUCIFER_CANNON )
{
@@ -950,6 +971,11 @@ void ClientThink_real( gentity_t *ent )
pm.autoWeaponHit[ client->ps.weapon ] = CheckPounceAttack( ent );
break;
+ case WP_GROUND_POUND:
+ if( client->ps.weaponTime <= 0 )
+ pm.autoWeaponHit[ client->ps.weapon ] = CheckChargeAttack( ent );
+ break;
+
default:
break;
}