From 58c402382c5581f11b07f078aa31e396f93c06eb Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sat, 3 Mar 2012 16:23:51 +0200 Subject: [PATCH] Fix some things I forgot, and make ground impact particles work again --- data/qcsrc/server/cl_physics.qc | 27 ++++++++++++++------------- data/qcsrc/server/sv_main.qc | 4 ++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 6f0a8612..505fde7a 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -866,31 +866,32 @@ void SV_PlayerPhysics() tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self); if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS) { - if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) - { - GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE); - pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', 1); - } - else - { - 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)); + pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', 1); + } else + { GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE * (1 - playersize_micro(self)), 1)); + pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', 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)); + { + GlobalSound(globalsound_metalfall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE); + pointparticles(particleeffectnum("ground_metal"), self.origin, '0 0 0', 1); + } else - GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE, 1)); + { + GlobalSound(globalsound_fall, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE); + pointparticles(particleeffectnum("ground_dirt"), self.origin, '0 0 0', 1); + } } } } diff --git a/data/qcsrc/server/sv_main.qc b/data/qcsrc/server/sv_main.qc index 52a03c23..28b470e0 100644 --- a/data/qcsrc/server/sv_main.qc +++ b/data/qcsrc/server/sv_main.qc @@ -118,9 +118,9 @@ void CreatureFrame (void) else { if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) - GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE, 1)); + GlobalSound(globalsound_metalstep, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE); else - GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, bound(0, VOL_BASE, 1)); + GlobalSound(globalsound_step, CHAN_PLAYER, VOICETYPE_PLAYERSOUND, VOL_BASE); } } } -- 2.39.2