]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
DODGING: adjust defaults to make more sense with tracebox
authorFlorian Paul Schmidt <mista.tapas@gmx.net>
Sun, 21 Mar 2010 15:34:03 +0000 (16:34 +0100)
committerFlorian Paul Schmidt <mista.tapas@gmx.net>
Sun, 21 Mar 2010 15:34:03 +0000 (16:34 +0100)
DODGING: use tracebox instead of traceline

defaultXonotic.cfg
qcsrc/server/mutators/mutator_dodging.qc

index 94450522c371cbf19e468ad427cb0cbfbd17c0b4..9b2d45be7f6a6c5f93a5474fe2b044b5ee8eb833 100644 (file)
@@ -521,8 +521,8 @@ set sv_dodging_delay 0.5 "determines how long a player has to wait to be able to
 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_wall_distance_threshold 40 "the maximum distance from a wall that still allows dodging"
+set sv_dodging_height_threshold 10 "the maximum height above ground where to allow dodging"
+set sv_dodging_wall_distance_threshold 10 "the maximum distance from a wall that still allows dodging"
 set sv_dodging_sound 1 "if 1 dodging makes a sound. if 0 dodging is silent"
 
 set leadlimit 0
index 6f2fe557c3fa542e3fb1c528fe54ff9a84833768..4b31116348b74349b9e38d478d1f747bd38fa954 100644 (file)
@@ -113,26 +113,22 @@ float check_close_to_wall(float threshold) {
 
 
        trace_end = self.origin + (1000*v_right);
-       traceline(trace_start, trace_end, TRUE, self);
-
+       tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
                return 1;
 
        trace_end = self.origin - (1000*v_right);
-       traceline(trace_start, trace_end, TRUE, self);
-
+       tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
                return 1;
 
        trace_end = self.origin + (1000*v_forward);
-       traceline(trace_start, trace_end, TRUE, self);
-
+       tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
                return 1;
 
        trace_end = self.origin - (1000*v_forward);
-       traceline(trace_start, trace_end, TRUE, self);
-
+       tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self);
        if (trace_fraction < 1 && vlen (self.origin - trace_endpos) < threshold)
                return 1;
 
@@ -165,7 +161,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
        trace_start = self.origin;
        trace_end = self.origin - (1000*v_up);
 
-       traceline(trace_start, trace_end, TRUE, self);
+       tracebox(trace_start, self.mins, self.maxs, trace_end, TRUE, self);
 
        // check if the trace hit anything at all
        if (trace_fraction > 1)