summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-15 08:17:14 +0200
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:20:59 +0200
commitebd43d72d1af22fcde4b9857fb226cefab9fcdbf (patch)
tree82273fc682052da36e33a11327acca3144b82656 /src
parent26e25997647bfcc8692a2209e5670d4c0119ea8c (diff)
multi-protocol: also update the cQVM-specific ammo&clips code
Diffstat (limited to 'src')
-rw-r--r--src/game/g_main.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/game/g_main.c b/src/game/g_main.c
index b4f8316..cb3ef01 100644
--- a/src/game/g_main.c
+++ b/src/game/g_main.c
@@ -3143,26 +3143,21 @@ static void G_CheckVampireDeathBuildables( void )
if( ent->client->pers.teamSelection == PTE_HUMANS )
{
- int ammo, clips, maxClips, maxAmmo;
+ int maxClips, maxAmmo;
BG_FindAmmoForWeapon( ent->client->ps.weapon, &maxAmmo, &maxClips );
- BG_UnpackAmmoArray( ent->client->ps.weapon, ent->client->ps.ammo,
- ent->client->ps.powerups, &ammo, &clips );
if( maxClips )
{
- if( clips < maxClips )
- clips++;
+ if( ent->client->ps.clips < maxClips )
+ ent->client->ps.clips++;
}
else
{
- ammo += maxAmmo / 5;
- if( ammo > maxAmmo )
- ammo = maxAmmo;
+ ent->client->ps.ammo += maxAmmo / 5;
+ if( ent->client->ps.ammo > maxAmmo )
+ ent->client->ps.ammo = maxAmmo;
}
-
- BG_PackAmmoArray( ent->client->ps.weapon, ent->client->ps.ammo,
- ent->client->ps.powerups, ammo, clips );
}
}
}