From 4c7445d8d83cd46651d362bc7677a0d7bef59a03 Mon Sep 17 00:00:00 2001 From: Florian Paul Schmidt Date: Sun, 21 Mar 2010 02:35:04 +0100 Subject: [PATCH] DODGING: make jumping sound (can be disabled by cvar) when dodging --- defaultXonotic.cfg | 1 + qcsrc/server/mutators/mutator_dodging.qc | 3 +++ 2 files changed, 4 insertions(+) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 9e723179f..12558d5b4 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -522,6 +522,7 @@ set sv_dodging_up_speed 200 "the jump velocity of the dodge" set sv_dodging_horiz_speed 350 "the horizontal velocity of the dodge" set sv_dodging_ramp_time 0.1 "a ramp so that the horizontal part of the dodge is added smoothly (seconds)" set sv_dodging_height_threshold 40 "the maximum height above ground where to allow dodging" +set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent" set leadlimit 0 diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc index bc660f0c9..710378c2f 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator_dodging.qc @@ -80,6 +80,9 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) { self.velocity + (cvar("sv_dodging_up_speed") * v_up); + if (cvar("sv_dodging_sound") == 1) + PlayerSound(playersound_jump, CHAN_PLAYER, VOICETYPE_PLAYERSOUND); + self.dodging_single_action = 0; } -- 2.39.2