summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 );
}
}
}