From 171dd1260cc04a4705994e93addde1c8c2449901 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sun, 18 Oct 2020 12:40:08 +1000 Subject: [PATCH] q3compat: Fix crash when ammo_bfg has count field set --- qcsrc/server/compat/quake3.qh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/server/compat/quake3.qh b/qcsrc/server/compat/quake3.qh index d6ca4fd55..55b2ede5c 100644 --- a/qcsrc/server/compat/quake3.qh +++ b/qcsrc/server/compat/quake3.qh @@ -11,7 +11,7 @@ bool DoesQ3ARemoveThisEntity(entity this); // The ammo spawnfunc knows which weapon will use the ammo so it can look up the type // and calculate the amount required for the number of shots in the count field. #define _SPAWNFUNC_Q3AMMO(ammo_classname, xonwep) \ - if(this.count) \ + if(this.count && xonwep.ammo_type) \ SetResource(this, xonwep.ammo_type, this.count * GetAmmoConsumptionPrimary(xonwep.netname)); \ spawnfunc_body(GetAmmoItem(xonwep.ammo_type)); -- 2.39.2