From: Mario <mario.mario@y7mail.com>
Date: Wed, 6 Jul 2022 15:04:29 +0000 (+1000)
Subject: Move weapon hardcoded impulses to the included weapon list and note when it should... 
X-Git-Tag: xonotic-v0.8.6~425^2
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3d3ebfd0c19b0b6149ae1f8e990de93921e84552;p=xonotic%2Fxonotic-data.pk3dir.git

Move weapon hardcoded impulses to the included weapon list and note when it should be updated along with a reference to the issue removing it causes
---

diff --git a/qcsrc/common/weapons/all.inc b/qcsrc/common/weapons/all.inc
index 4da01579f..15e61025b 100644
--- a/qcsrc/common/weapons/all.inc
+++ b/qcsrc/common/weapons/all.inc
@@ -25,3 +25,7 @@
 #include "weapon/seeker.qh"
 #include "weapon/shockwave.qh"
 #include "weapon/arc.qh"
+
+// Weapon registry is sorted to allocate the weapons included above first, update the value below to the number of listed weapons
+// TODO: remove eventually in a way that does not cause https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/2714
+#define WEP_HARDCODED_IMPULSES 20
diff --git a/qcsrc/common/weapons/all.qh b/qcsrc/common/weapons/all.qh
index 37858af5b..286b7a3d3 100644
--- a/qcsrc/common/weapons/all.qh
+++ b/qcsrc/common/weapons/all.qh
@@ -308,10 +308,7 @@ WepSet WEPSET_SUPERWEAPONS;
 
 #include "all.inc"
 
-// TODO: remove after 0.8.5. Retains impulse number compatibility because 0.8.1 clients don't reload the weapons.cfg
-#define WEP_HARDCODED_IMPULSES 20
-
-// TODO: invert after 0.8.5. Will require moving 'best weapon' impulses
+// TODO: invert after changes have been made to the hardcoded weapon impulses. Will require moving 'best weapon' impulses
 #define WEP_IMPULSE_BEGIN 230
 #define WEP_IMPULSE_END bound(WEP_IMPULSE_BEGIN, WEP_IMPULSE_BEGIN + (REGISTRY_COUNT(Weapons) - 1) - 1, 253)