summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_cmds.c')
-rw-r--r--src/game/g_cmds.c10
1 files changed, 6 insertions, 4 deletions
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;
}
}
}