]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qh
Some viewmodel_draw() optimisations
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qh
index 356c3882a920d84537261cbc8b9acb9ba7b26be2..2931207135cbcfdf1bacddb435f38eae4cc9a39a 100644 (file)
@@ -308,11 +308,11 @@ WepSet WEPSET_SUPERWEAPONS;
 
 #include "all.inc"
 
-// TODO: invert after 0.8.2. 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)
 
-REGISTRY_SORT(Weapons, 1)
+REGISTRY_SORT(Weapons, WEP_HARDCODED_IMPULSES + 1)
 REGISTRY_CHECK(Weapons)
 
 STATIC_INIT(register_weapons_done)
@@ -329,7 +329,7 @@ STATIC_INIT(register_weapons_done)
         else
                inaccessible = strcat(inaccessible, "\n", it.netname);
     });
-    if (inaccessible && autocvar_developer > 0) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
+    if (inaccessible != "" && autocvar_developer > 0) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
     #ifdef CSQC
     FOREACH(Weapons, true, it.wr_init(it));
     #endif
@@ -356,7 +356,9 @@ vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent)
 //.int weapon; // current weapon
 .string weaponname; // name of .weapon
 
+#ifdef SVQC
 .vector spawnorigin; // for casings
+#endif
 
 .vector movedir_aligned; // shot origin based on weapon alignment (unaffected by shootfromeye)