From: Mario Date: Mon, 27 Feb 2017 08:18:45 +0000 (+1000) Subject: Use WEP_CVAR instead of a hacky stat for getting vortex glowing effect, also disable... X-Git-Tag: xonotic-v0.8.2~173 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6dd3783878346fc5546b9eb4b4208f9bf518dd3c;p=xonotic%2Fxonotic-data.pk3dir.git Use WEP_CVAR instead of a hacky stat for getting vortex glowing effect, also disable debugtrace --- diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 8bdbcf705..1723a1c7a 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -257,6 +257,7 @@ GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars") } } +#ifdef DEBUGTRACE REGISTER_STAT(TRACE_ENT, int) #ifdef SVQC bool autocvar_debugtrace; @@ -312,6 +313,7 @@ STATIC_INIT(TRACE_ENT) IL_PUSH(g_drawables_2d, e); } #endif +#endif GENERIC_COMMAND(find, "Search through entities for matching classname") { diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index abb84008e..357f2723f 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -67,8 +67,8 @@ REGISTER_WEAPON(VORTEX, vortex, NEW(Vortex)); #endif #ifdef IMPLEMENTATION -REGISTER_STAT(WEP_CVAR_vortex_charge, bool, WEP_CVAR(vortex, charge)) -REGISTER_STAT(WEP_CVAR_vortex_charge_animlimit, float, WEP_CVAR(vortex, charge_animlimit)) +//REGISTER_STAT(WEP_CVAR_vortex_charge, bool, WEP_CVAR(vortex, charge)) +//REGISTER_STAT(WEP_CVAR_vortex_charge_animlimit, float, WEP_CVAR(vortex, charge_animlimit)) #if defined(GAMEQC) float autocvar_g_weapon_charge_colormod_red_full; @@ -81,9 +81,9 @@ float autocvar_g_weapon_charge_colormod_hdrmultiplier; METHOD(Vortex, wr_glow, vector(Vortex this, entity actor, entity wepent)) { - if (!STAT(WEP_CVAR_vortex_charge, actor)) return '0 0 0'; + if (!WEP_CVAR(vortex, charge)) return '0 0 0'; float charge = wepent.vortex_charge; - float animlimit = STAT(WEP_CVAR_vortex_charge_animlimit, actor); + float animlimit = WEP_CVAR(vortex, charge_animlimit); vector g; g.x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, charge / animlimit); g.y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, charge / animlimit);