From 2fee01ff7a189aeb96084c76fa1a4189518d2531 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 3 Mar 2012 16:12:32 +0200 Subject: [PATCH] Make the earthquake sounds work properly with macro players --- data/qcsrc/server/miscfunctions.qc | 2 +- data/qcsrc/server/sv_main.qc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); } } } -- 2.39.2