X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Feffects%2Fqc%2Fglobalsound.qc;h=43a489105f67dccf94a2f9cb089800e9cfded321;hb=ac7deb97b1a0e73ceea4684be73e72912fb3f1aa;hp=afc366ba0c2796bba55a73860224bf8c420a861c;hpb=c05104bde1e758c4022f9755f02f177aa0476134;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/effects/qc/globalsound.qc b/qcsrc/common/effects/qc/globalsound.qc index afc366ba0..43a489105 100644 --- a/qcsrc/common/effects/qc/globalsound.qc +++ b/qcsrc/common/effects/qc/globalsound.qc @@ -4,13 +4,6 @@ #include - #ifdef SVQC - #include - #endif - #ifdef CSQC - #include - #endif - REGISTER_NET_TEMP(globalsound) REGISTER_NET_TEMP(playersound) @@ -338,7 +331,7 @@ msg_entity = this.pusher; if (IS_REAL_CLIENT(msg_entity)) { - float atten = (CS(msg_entity).cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; + float atten = (CS_CVAR(msg_entity).cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten, thepitch); else if (ps) playersound(MSG_ONE, this, ps, r, chan, vol, atten, thepitch); else soundto(MSG_ONE, this, chan, sample, vol, atten, thepitch); @@ -358,7 +351,7 @@ { #define X() \ MACRO_BEGIN \ - float atten = (CS(msg_entity).cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; \ + float atten = (CS_CVAR(msg_entity).cvar_cl_voice_directional == 1) ? ATTEN_MIN : ATTEN_NONE; \ if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten, thepitch); \ else if (ps) playersound(MSG_ONE, this, ps, r, chan, vol, atten, thepitch); \ else soundto(MSG_ONE, this, chan, sample, vol, atten, thepitch); \ @@ -380,22 +373,22 @@ { if (voicetype == VOICETYPE_AUTOTAUNT) { - if (!sv_autotaunt) break; + if (!autocvar_sv_autotaunt) break; } else if (IS_PLAYER(this) && !IS_DEAD(this)) animdecide_setaction(this, ANIMACTION_TAUNT, true); - if (!sv_taunt) break; + if (!autocvar_sv_taunt) break; if (autocvar_sv_gentle) break; float tauntrand = 0; if (voicetype == VOICETYPE_AUTOTAUNT) tauntrand = random(); #define X() \ MACRO_BEGIN \ - if (voicetype != VOICETYPE_AUTOTAUNT || tauntrand < CS(msg_entity).cvar_cl_autotaunt) \ + if (voicetype != VOICETYPE_AUTOTAUNT || tauntrand < CS_CVAR(msg_entity).cvar_cl_autotaunt) \ { \ - float atten = (CS(msg_entity).cvar_cl_voice_directional >= 1) \ - ? bound(ATTEN_MIN, CS(msg_entity).cvar_cl_voice_directional_taunt_attenuation, \ + float atten = (CS_CVAR(msg_entity).cvar_cl_voice_directional >= 1) \ + ? bound(ATTEN_MIN, CS_CVAR(msg_entity).cvar_cl_voice_directional_taunt_attenuation, \ ATTEN_MAX) \ : ATTEN_NONE; \ if (gs) globalsound(MSG_ONE, this, gs, r, chan, vol, atten, thepitch); \