]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qh
Fix FL_WEAPON flag overlapping FL_JUMPRELEASED. This unintentional change was introdu...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qh
index 0016790c86ef2b584c3599ae44d33db4aa7f6d1f..50c6e3cb50d98e53a29c241a9e4f8de66107a226 100644 (file)
@@ -308,10 +308,7 @@ WepSet WEPSET_SUPERWEAPONS;
 
 #include "all.inc"
 
-// TODO: remove after 0.8.2. 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.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)
 
@@ -332,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
@@ -347,10 +344,10 @@ STATIC_INIT(register_weapons_done)
 
 .entity weaponchild;
 .entity exteriorweaponentity;
-vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent)
+vector weaponentity_glowmod(Weapon wep, int c, entity wepent)
 {
     vector g;
-    if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+    if (!(g = wep.wr_glow(wep, c, wepent))) g = colormapPaletteColor(c & 0x0F, true);
     return g;
 }
 
@@ -359,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)
 
@@ -391,14 +390,20 @@ ENUMCLASS_END(WFRAME)
     #define G_SHOOTFROMFIXEDORIGIN autocvar_cl_shootfromfixedorigin
 #endif
 
-vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
+vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn);
 void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
 
+REPLICATE_INIT(int, cvar_cl_gunalign);
+REPLICATE_INIT(bool, cvar_cl_weapon_switch_reload);
+REPLICATE_INIT(bool, cvar_cl_weapon_switch_fallback_to_impulse);
+REPLICATE_INIT(int, cvar_cl_weaponimpulsemode);
+
+REPLICATE_INIT(string, cvar_cl_weaponpriority);
+REPLICATE_INIT(string, cvar_cl_weaponpriorities[10]);
+
 #ifdef CSQC
-bool cvar_cl_accuracy_data_share;
-REPLICATE(cvar_cl_accuracy_data_share, bool, "cl_accuracy_data_share");
-bool cvar_cl_accuracy_data_receive;
-REPLICATE(cvar_cl_accuracy_data_receive, bool, "cl_accuracy_data_receive");
+REPLICATE_INIT(bool, cvar_cl_accuracy_data_share);
+REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive);
 #endif
 
 #ifdef SVQC
@@ -410,18 +415,4 @@ string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(entity this, string wo
 string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
 #endif
 
-REPLICATE_FIELD(string, cvar_cl_weaponpriority);
-REPLICATE_FIELD(string, cvar_cl_weaponpriorities[10]);
-REPLICATE(cvar_cl_weaponpriority, string, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
-REPLICATE(cvar_cl_weaponpriorities[0], string, "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[1], string, "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[2], string, "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[3], string, "cl_weaponpriority3", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[4], string, "cl_weaponpriority4", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[5], string, "cl_weaponpriority5", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[6], string, "cl_weaponpriority6", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[7], string, "cl_weaponpriority7", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[8], string, "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
-REPLICATE(cvar_cl_weaponpriorities[9], string, "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
-
 #endif