seta cl_dodging_timeout 0.2 "determines how long apart (in seconds) two taps on the same direction key are considered a dodge. use 0 to disable"
set sv_dodging_wall_dodging 0 "set to 1 to allow dodging off walls. 0 to disable"
-set sv_dodging_delay 0.5 "determines how long a player has to wait to be able to dodge again after dodging"
+set sv_dodging_delay 0.7 "determines how long a player has to wait to be able to dodge again after dodging"
set sv_dodging_up_speed 200 "the jump velocity of the dodge"
set sv_dodging_horiz_speed 400 "the horizontal velocity of the dodge"
set sv_dodging_horiz_speed_frozen 200 "the horizontal velocity of the dodge while frozen"
tap_direction_x = 0;
tap_direction_y = 0;
+
+ float frozen_dodging;
+ frozen_dodging = (self.freezetag_frozen && autocvar_sv_dodging_frozen);
float dodge_detected;
if (g_dodging == 0)
if (self.movement_x > 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_FORWARD)) {
+ if (!(self.pressedkeys & KEY_FORWARD) || frozen_dodging) {
if ((time - self.last_FORWARD_KEY_time) < self.cvar_cl_dodging_timeout) {
tap_direction_x = 1.0;
dodge_detected = 1;
if (self.movement_x < 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_BACKWARD)) {
+ if (!(self.pressedkeys & KEY_BACKWARD) || frozen_dodging) {
tap_direction_x = -1.0;
if ((time - self.last_BACKWARD_KEY_time) < self.cvar_cl_dodging_timeout) {
dodge_detected = 1;
if (self.movement_y > 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_RIGHT)) {
+ if (!(self.pressedkeys & KEY_RIGHT) || frozen_dodging) {
tap_direction_y = 1.0;
if ((time - self.last_RIGHT_KEY_time) < self.cvar_cl_dodging_timeout) {
dodge_detected = 1;
if (self.movement_y < 0) {
// is this a state change?
- if (!(self.pressedkeys & KEY_LEFT)) {
+ if (!(self.pressedkeys & KEY_LEFT) || frozen_dodging) {
tap_direction_y = -1.0;
if ((time - self.last_LEFT_KEY_time) < self.cvar_cl_dodging_timeout) {
dodge_detected = 1;