X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fspawning.qc;h=30a2869f399f42b1887a4d7e626364a3f7b81b4e;hb=6d997e7ed11d0f4a3449e8dcab751b06bb305743;hp=ec9952fff27039ee857fdc9b036ffbc6d65618e0;hpb=86f963161de59765b280c58aa25e73c1ea42284e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/spawning.qc b/qcsrc/server/weapons/spawning.qc index ec9952fff..30a2869f3 100644 --- a/qcsrc/server/weapons/spawning.qc +++ b/qcsrc/server/weapons/spawning.qc @@ -1,11 +1,12 @@ #include "spawning.qh" -#include "weaponsystem.qh" -#include "../resources.qh" -#include +#include +#include #include #include -#include +#include +#include +#include .bool m_isreplaced; ///< Holds whether the weapon has been replaced. @@ -107,11 +108,12 @@ void weapon_defaultspawnfunc(entity this, Weapon wpn) this.superweapons_finished = autocvar_g_balance_superweapons_time; // if we don't already have ammo, give us some ammo + // TODO: registry handles if ((wpn.ammo_type != RES_NONE) && !GetResource(this, wpn.ammo_type)) { int ammo = 0; - if (this.count > 0) - ammo = this.count * GetAmmoConsumptionPrimary(wpn.netname); + if (q3compat && this.count > 0) + ammo = this.count * GetAmmoConsumptionQ3(wpn.netname); // WEAPONTODO: magazines of MG, rifle and OK weapons are unaccounted for else {