]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/all.qh
Purge autocvars.qh from the codebase, cvars are defined in the headers of the feature...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / all.qh
index 14134e5e287b5c4ce2967cd80b7c11576413d06c..479c0b6b39069c7171f51ab969415dc6840414a9 100644 (file)
@@ -20,6 +20,7 @@ WepSet ReadWepSet();
 #include "calculations.qh"
 #include "projectiles.qh"
 #include <common/models/all.qh>
+#include <common/effects/all.qh>
 #endif
 
 #include <common/util.qh>
@@ -291,6 +292,7 @@ const .float reloading_time = reload_time;
 
 
 // read cvars from weapon settings
+// cvars are created as such: g_balance_wepname_name
 #define WEP_CVAR(wepname, name) (_wep_##wepname.wepvar_##name)
 #define WEP_CVAR_PRI(wepname, name) WEP_CVAR(wepname, primary_##name)
 #define WEP_CVAR_SEC(wepname, name) WEP_CVAR(wepname, secondary_##name)
@@ -327,7 +329,7 @@ STATIC_INIT(register_weapons_done)
         else
                inaccessible = strcat(inaccessible, "\n", it.netname);
     });
-    if (inaccessible) 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
@@ -364,6 +366,8 @@ vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent)
 .vector anim_idle;
 .vector anim_reload;
 
+.entity muzzle_flash;
+
 // static frame globals
 
 ENUMCLASS(WFRAME)
@@ -377,6 +381,7 @@ ENUMCLASS_END(WFRAME)
 .WFRAME wframe;
 
 #ifdef SVQC
+    string autocvar_g_shootfromfixedorigin;
     #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
 #elif defined(CSQC)
     string autocvar_cl_shootfromfixedorigin;
@@ -398,6 +403,6 @@ void wframe_send(entity actor, entity weaponentity, int wepframe, float attackra
 #endif
 
 #ifdef SVQC
-void W_MuzzleFlash(entity actor, .entity weaponentity, entity eff, vector shotorg, vector shotdir);
+void W_MuzzleFlash(Weapon thiswep, entity actor, .entity weaponentity, vector shotorg, vector shotdir);
 #endif
 #endif