X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fweaponsystem.qc;h=9c0c402e34722b1a03064d694a77cbf454c677b6;hb=3fc2359b7933352424af07db8f84cbb9342e934f;hp=d791fc798e3056c1eb8dd6c5931561f4b282871e;hpb=2e05a1d8421ee2cbb604582d644133500aae2450;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index d791fc798..9c0c402e3 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -454,7 +454,7 @@ void W_WeaponFrame(Player actor, .entity weaponentity) entity this = actor.(weaponentity); if (frametime) this.weapon_frametime = frametime; - if (!this || GetResourceAmount(actor, RESOURCE_HEALTH) < 1) return; // Dead player can't use weapons and injure impulse commands + if (!this || GetResourceAmount(actor, RES_HEALTH) < 1) return; // Dead player can't use weapons and injure impulse commands int button_atck = PHYS_INPUT_BUTTON_ATCK(actor); int button_atck2 = PHYS_INPUT_BUTTON_ATCK2(actor); @@ -692,7 +692,7 @@ void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use, .entity weaponenti w_ent.clip_load -= ammo_use; w_ent.(weapon_load[w_ent.m_weapon.m_id]) = w_ent.clip_load; } - else if (wep.ammo_type != RESOURCE_NONE) + else if (wep.ammo_type != RES_NONE) { float ammo = GetResourceAmount(actor, wep.ammo_type); if (ammo < ammo_use) @@ -727,7 +727,7 @@ void W_ReloadedAndReady(Weapon thiswep, entity actor, .entity weaponentity, int w_ent.clip_load = w_ent.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading // if the gun uses no ammo, max out weapon load, else decrease ammo as we increase weapon load - if (!w_ent.reload_ammo_min || (actor.items & IT_UNLIMITED_WEAPON_AMMO) || wpn.ammo_type == RESOURCE_NONE) + if (!w_ent.reload_ammo_min || (actor.items & IT_UNLIMITED_WEAPON_AMMO) || wpn.ammo_type == RES_NONE) { w_ent.clip_load = w_ent.reload_ammo_amount; } @@ -779,7 +779,7 @@ void W_Reload(entity actor, .entity weaponentity, float sent_ammo_min, Sound sen if (this.clip_load >= this.reload_ammo_amount) return; // no ammo, so nothing to load - if (e.ammo_type != RESOURCE_NONE) + if (e.ammo_type != RES_NONE) { if (!GetResourceAmount(actor, e.ammo_type) && this.reload_ammo_min) {