summaryrefslogtreecommitdiff
path: root/src/game/g_trigger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_trigger.c')
-rw-r--r--src/game/g_trigger.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/g_trigger.c b/src/game/g_trigger.c
index 7e208667..c3d4681c 100644
--- a/src/game/g_trigger.c
+++ b/src/game/g_trigger.c
@@ -1087,10 +1087,10 @@ void trigger_ammo_touch( gentity_t *self, gentity_t *other, trace_t *trace )
if( other->client->ps.weaponstate != WEAPON_READY )
return;
- if( BG_FindUsesEnergyForWeapon( other->client->ps.weapon ) && self->spawnflags & 2 )
+ if( BG_Weapon( other->client->ps.weapon )->usesEnergy && self->spawnflags & 2 )
return;
- if( !BG_FindUsesEnergyForWeapon( other->client->ps.weapon ) && self->spawnflags & 4 )
+ if( !BG_Weapon( other->client->ps.weapon )->usesEnergy && self->spawnflags & 4 )
return;
if( self->spawnflags & 1 )
@@ -1098,7 +1098,8 @@ void trigger_ammo_touch( gentity_t *self, gentity_t *other, trace_t *trace )
else
self->timestamp = level.time + FRAMETIME;
- BG_FindAmmoForWeapon( other->client->ps.weapon, &maxAmmo, &maxClips );
+ maxAmmo = BG_Weapon( other->client->ps.weapon )->maxAmmo;
+ maxClips = BG_Weapon( other->client->ps.weapon )->maxClips;
if( ( other->client->ps.ammo + self->damage ) > maxAmmo )
{