From 47bc216a79265cfc9c709b951f5e421e91844063 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 3 Mar 2012 16:20:55 +0200 Subject: [PATCH] Same for the falling sounds --- data/qcsrc/server/cl_physics.qc | 16 ++++++++++++++++ data/qcsrc/server/sv_main.qc | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 69bd25db..6f0a8612 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -876,6 +876,22 @@ void SV_PlayerPhysics() GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE); pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', 1); } + + if(cvar("g_healthsize")) + { + if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) + GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1)); + else + GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1)); + sound(self, CHAN_AUTO, "misc/macro_hitground.wav", bound(0, VOL_BASE * playersize_macro(self), 1), ATTN_NORM); + } + else + { + if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) + GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE, 1)); + else + GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE, 1)); + } } } } diff --git a/data/qcsrc/server/sv_main.qc b/data/qcsrc/server/sv_main.qc index 25eaaf93..52a03c23 100644 --- a/data/qcsrc/server/sv_main.qc +++ b/data/qcsrc/server/sv_main.qc @@ -113,7 +113,7 @@ void CreatureFrame (void) GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1)); else GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1)); - sound(self, CHAN_AUTO, "misc/macro_footstep.wav", bound(0, VOL_BASE * normal_to_macro, 1), ATTN_NORM); + sound(self, CHAN_AUTO, "misc/macro_footstep.wav", bound(0, VOL_BASE * playersize_macro(self), 1), ATTN_NORM); } else { -- 2.39.2