From: MirceaKitsune Date: Sat, 3 Mar 2012 14:12:32 +0000 (+0200) Subject: Make the earthquake sounds work properly with macro players X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2fee01ff7a189aeb96084c76fa1a4189518d2531;p=voretournament%2Fvoretournament.git Make the earthquake sounds work properly with macro players --- diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index bcf1c1d8..4ccf1e26 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -2614,5 +2614,5 @@ float playersize_macro(entity e) { if(!cvar("g_healthsize")) return 0; - return bound(0, (e.health / cvar("g_healthsize_max") - 1) / (cvar("g_healthsize_center") / cvar("g_healthsize_max") - 1), 1); + return 1 - bound(0, (e.health / cvar("g_healthsize_max") - 1) / (cvar("g_healthsize_center") / cvar("g_healthsize_max") - 1), 1); } diff --git a/data/qcsrc/server/sv_main.qc b/data/qcsrc/server/sv_main.qc index 92819c2c..e2f26c8c 100644 --- a/data/qcsrc/server/sv_main.qc +++ b/data/qcsrc/server/sv_main.qc @@ -124,7 +124,7 @@ void CreatureFrame (void) else GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * micro_to_normal, 1)); - //sound(self, CHAN_AUTO, "misc/macro_footstep.wav", VOL_BASE, ATTN_NORM); + sound(self, CHAN_AUTO, "misc/macro_footstep.wav", bound(0, VOL_BASE * normal_to_macro, 1), ATTN_NORM); } } }