From: Mario Date: Fri, 25 Apr 2025 10:32:18 +0000 (+1000) Subject: Give the weapon impulse field a unique name to avoid some confusion X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=64baf8700bf1d63de366dc7aa8f36a78b9f9ef55;p=xonotic%2Fxonotic-data.pk3dir.git Give the weapon impulse field a unique name to avoid some confusion --- diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh index 3ae3aadcf1..85b95243f2 100644 --- a/qcsrc/common/weapons/all.qh +++ b/qcsrc/common/weapons/all.qh @@ -46,7 +46,7 @@ STATIC_INIT(WeaponPickup) #define WepSet_FromWeapon(it) ((it).m_wepset) WepSet _WepSet_FromWeapon(int i); -.int m_impulse; +.int m_unique_impulse; #define DEFAULT_FILENAME "weapons_dump.cfg" // NOTE: dumpeffectinfo, dumpnotifs, dumpturrets and dumpweapons use similar code @@ -146,7 +146,7 @@ Weapon Weapon_from_name(string s) Weapon Weapon_from_impulse(int imp) { - FOREACH(Weapons, it != WEP_Null && it.m_impulse == imp, return it); + FOREACH(Weapons, it != WEP_Null && it.m_unique_impulse == imp, return it); return WEP_Null; } @@ -347,7 +347,7 @@ STATIC_INIT(register_weapons_done) // TODO: this exists to filter out the Ball Stealer, otherwise we run out of impulses if ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_TYPE_OTHER)) continue; - it.m_impulse = imp; + it.m_unique_impulse = imp; if (imp <= WEP_IMPULSE_END) localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", it.netname, imp)); else