diff options
author | Jeff Kent <jeff@jkent.net> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 17:20:41 +0200 |
commit | 26e25997647bfcc8692a2209e5670d4c0119ea8c (patch) | |
tree | be69b2f824a6b749e12849a8b6da32e6ca59d1a0 /src/game/g_active.c | |
parent | b4c0348da140348f3cbb48cfe544c5682c9e5d34 (diff) |
multi-protocol: change the playerState_t and entityState_t structs to the versions in the latest code base
this includes changing how ammo and clips r stored
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 5b167a5..147aabc 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -800,7 +800,7 @@ void ClientTimerActions( gentity_t *ent, int msec ) { int ammo; - BG_UnpackAmmoArray( WP_LUCIFER_CANNON, client->ps.ammo, client->ps.powerups, &ammo, NULL ); + ammo = client->ps.ammo; if( client->ps.stats[ STAT_MISC ] < LCANNON_TOTAL_CHARGE && ucmd->buttons & BUTTON_ATTACK ) client->ps.stats[ STAT_MISC ] += ( 100.0f / LCANNON_CHARGE_TIME ) * LCANNON_TOTAL_CHARGE; @@ -1099,12 +1099,13 @@ void ClientTimerActions( gentity_t *ent, int msec ) int ammo, maxAmmo; BG_FindAmmoForWeapon( WP_ALEVEL3_UPG, &maxAmmo, NULL ); - BG_UnpackAmmoArray( WP_ALEVEL3_UPG, client->ps.ammo, client->ps.powerups, &ammo, NULL ); + ammo = client->ps.ammo; if( ammo < maxAmmo ) { ammo++; - BG_PackAmmoArray( WP_ALEVEL3_UPG, client->ps.ammo, client->ps.powerups, ammo, 0 ); + client->ps.ammo = ammo; + client->ps.clips = 0; } } } |