]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
DODGING: make jumping sound (can be disabled by cvar) when dodging
authorFlorian Paul Schmidt <mista.tapas@gmx.net>
Sun, 21 Mar 2010 01:35:04 +0000 (02:35 +0100)
committerFlorian Paul Schmidt <mista.tapas@gmx.net>
Sun, 21 Mar 2010 01:35:04 +0000 (02:35 +0100)
defaultXonotic.cfg
qcsrc/server/mutators/mutator_dodging.qc

index 9e723179f1968753062c9b88deeb78a4df7bb7a1..12558d5b4ff309d044a6cb2d556f7afb0c7d9b56 100644 (file)
@@ -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
 
index bc660f0c97e02e2e51377cfdcd161ccce6ee13e8..710378c2f809acc9a57410d7307431ed27c0cbab 100644 (file)
@@ -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;
        }