summaryrefslogtreecommitdiff
path: root/src/game/g_cmds.c
diff options
context:
space:
mode:
authorJeff Kent <jeff@jkent.net>2017-04-13 11:30:00 +0000
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:20:41 +0200
commit26e25997647bfcc8692a2209e5670d4c0119ea8c (patch)
treebe69b2f824a6b749e12849a8b6da32e6ca59d1a0 /src/game/g_cmds.c
parentb4c0348da140348f3cbb48cfe544c5682c9e5d34 (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_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;
}
}
}