]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
URS: Fixed weapon spawning.
authorLyberta <lyberta@lyberta.net>
Thu, 7 Sep 2017 15:45:59 +0000 (18:45 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 7 Sep 2017 15:45:59 +0000 (18:45 +0300)
qcsrc/server/weapons/spawning.qc

index e4d8dd388c154c4c0fa02d0b65b7bae832bc472a..d5b78aa1cd064424b267ca3cfc2ce7c782714d09 100644 (file)
@@ -102,7 +102,7 @@ void weapon_defaultspawnfunc(entity this, Weapon e)
                        this.superweapons_finished = autocvar_g_balance_superweapons_time;
 
        // if we don't already have ammo, give us some ammo
-       if (!GetResourceAmount(this, wpn.ammo_type))
+       if ((wpn.ammo_type != RESOURCE_NONE) && !GetResourceAmount(this, wpn.ammo_type))
        {
                switch (wpn.ammo_type)
                {