From: Martin Taibr Date: Sat, 19 Aug 2017 13:53:39 +0000 (+0200) Subject: comment eebug stmts X-Git-Tag: xonotic-v0.8.5~2430^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=52012e26b75a4d76fe516dd25f7ad2c7d2412aa9;p=xonotic%2Fxonotic-data.pk3dir.git comment eebug stmts --- diff --git a/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc b/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc index b57a1459f..8dd93fdb5 100644 --- a/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc +++ b/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc @@ -156,17 +156,21 @@ bool PM_dodging_checkpressedkeys(entity this) bool dodge_detected = false; vector mymovement = PHYS_CS(this).movement; - #define X(COND,BTN,RESULT) \ - if (mymovement_##COND) \ - /* is this a state change? */ \ - if(!(PHYS_DODGING_PRESSED_KEYS(this) & KEY_##BTN) || frozen_no_doubletap) { \ - tap_direction_##RESULT; \ - if ((time - this.last_##BTN##_KEY_time) < PHYS_DODGING_TIMEOUT(this) || frozen_no_doubletap) \ - dodge_detected = true; \ - if(PHYS_INPUT_BUTTON_DODGE(this)) \ - dodge_detected = true; \ - this.last_##BTN##_KEY_time = time; \ - } + #define X(COND,BTN,RESULT) \ + if (mymovement_##COND) { \ + /* is this a state change? */ \ + if(!(PHYS_DODGING_PRESSED_KEYS(this) & KEY_##BTN) || frozen_no_doubletap) { \ + /*LOG_INFOF("state change %f\n", time);*/ \ + tap_direction_##RESULT; \ + if ((time - this.last_##BTN##_KEY_time) < PHYS_DODGING_TIMEOUT(this) || frozen_no_doubletap) { \ + /*LOG_INFOF("dodge repress %f (%s)\n", time - this.last_##BTN##_KEY_time, this.netname);*/ \ + dodge_detected = true; \ + } else if(PHYS_INPUT_BUTTON_DODGE(this)) { \ + dodge_detected = true; \ + } \ + this.last_##BTN##_KEY_time = time; \ + } \ + } X(x < 0, BACKWARD, x--); X(x > 0, FORWARD, x++); X(y < 0, LEFT, y--); @@ -184,7 +188,7 @@ bool PM_dodging_checkpressedkeys(entity this) bool can_air_dodge = (PHYS_DODGING_AIR && (PHYS_DODGING_AIR_MAXSPEED == 0 || vdist(this.velocity, <, PHYS_DODGING_AIR_MAXSPEED))); if (!can_dodge && !can_wall_dodge && !can_air_dodge) return false; - LOG_INFOF("dodge delay %f (%s)\n", time - this.last_dodging_time, this.netname); // TODO lowest i got with double press: 0.63 + //LOG_INFOF("dodge delay %f (%s)\n", time - this.last_dodging_time, this.netname); // TODO lowest i got with double press: 0.63 this.last_dodging_time = time; this.dodging_action = 1;