From: Florian Paul Schmidt Date: Mon, 29 Mar 2010 23:03:21 +0000 (+0200) Subject: DODGING: Check if swimming. If so, don't allow dodging X-Git-Tag: xonotic-v0.1.0preview~669^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4d250caf56187162684e82956c6e0890ee6f18f;p=xonotic%2Fxonotic-data.pk3dir.git DODGING: Check if swimming. If so, don't allow dodging --- diff --git a/qcsrc/server/mutators/mutator_dodging.qc b/qcsrc/server/mutators/mutator_dodging.qc index ba8e021ea..62caadc1b 100644 --- a/qcsrc/server/mutators/mutator_dodging.qc +++ b/qcsrc/server/mutators/mutator_dodging.qc @@ -46,10 +46,15 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) { float common_factor; - // is dodging enabled at all? if not, do nothing.. if (g_dodging == 0) return 0; + // when swimming, no dodging allowed.. + if (self.waterlevel >= WATERLEVEL_SWIMMING) { + self.dodging_action = 0; + return 0; + } + // make sure v_up, v_right and v_forward are sane makevectors(self.angles);