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_cmds.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/game/g_cmds.c') diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index 5c5101b..1233e31 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -445,7 +445,8 @@ void Cmd_Give_f( gentity_t *ent ) BG_InventoryContainsUpgrade( UP_BATTPACK, client->ps.stats ) ) maxAmmo = (int)( (float)maxAmmo * BATTPACK_MODIFIER ); - BG_PackAmmoArray( client->ps.weapon, client->ps.ammo, client->ps.powerups, maxAmmo, maxClips ); + client->ps.ammo = maxAmmo; + client->ps.clips = maxClips; } } @@ -3850,8 +3851,8 @@ void Cmd_Buy_f( gentity_t *ent ) BG_InventoryContainsUpgrade( UP_BATTPACK, ent->client->ps.stats ) ) maxAmmo = (int)( (float)maxAmmo * BATTPACK_MODIFIER ); - BG_PackAmmoArray( weapon, ent->client->ps.ammo, ent->client->ps.powerups, - maxAmmo, maxClips ); + ent->client->ps.ammo = maxAmmo; + ent->client->ps.clips = maxClips; G_ForceWeaponChange( ent, weapon ); @@ -4073,7 +4074,8 @@ void Cmd_Sell_f( gentity_t *ent ) BG_FindUsesEnergyForWeapon( j ) && !BG_FindInfinteAmmoForWeapon( j ) ) { - BG_PackAmmoArray( j, ent->client->ps.ammo, ent->client->ps.powerups, 0, 0 ); + ent->client->ps.ammo = 0; + ent->client->ps.clips = 0; } } } -- cgit