summaryrefslogtreecommitdiff
path: root/src/game/g_active.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2002-06-21 23:07:48 +0000
committerTim Angus <tim@ngus.net>2002-06-21 23:07:48 +0000
commit9c84a1fc74a03edec430290a8da5d20b06a7d027 (patch)
tree802c06846d54357b1262a7dd58be0579f6aea78a /src/game/g_active.c
parent23a3cf67841b44ddfbdc482af08abc2142f66033 (diff)
Weapon additions???
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r--src/game/g_active.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c
index ff229da7..89c45cf7 100644
--- a/src/game/g_active.c
+++ b/src/game/g_active.c
@@ -492,6 +492,23 @@ void ClientTimerActions( gentity_t *ent, int msec )
client->ps.stats[ STAT_MISC ] = MAX_POUNCE_SPEED;
}
+ //client is charging up an lcanon
+ if( client->ps.weapon == WP_LUCIFER_CANON )
+ {
+ int ammo;
+
+ BG_unpackAmmoArray( WP_LUCIFER_CANON, client->ps.ammo, client->ps.powerups, &ammo, NULL, NULL );
+
+ if( client->ps.stats[ STAT_MISC ] < LC_TOTAL_CHARGE && ucmd->buttons & BUTTON_ATTACK )
+ client->ps.stats[ STAT_MISC ] += ( 100.0f / LC_CHARGE_TIME ) * LC_TOTAL_CHARGE;
+
+ if( client->ps.stats[ STAT_MISC ] > LC_TOTAL_CHARGE )
+ client->ps.stats[ STAT_MISC ] = LC_TOTAL_CHARGE;
+
+ if( client->ps.stats[ STAT_MISC ] > ( ammo * LC_TOTAL_CHARGE ) / 10 )
+ client->ps.stats[ STAT_MISC ] = ammo * LC_TOTAL_CHARGE / 10;
+ }
+
#define LAUNCH_TIME 2000
switch( client->ps.weapon )