From 26e25997647bfcc8692a2209e5670d4c0119ea8c Mon Sep 17 00:00:00 2001 From: Jeff Kent Date: Thu, 13 Apr 2017 11:30:00 +0000 Subject: 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 --- src/game/g_active.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/game/g_active.c') 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; } } } -- cgit