duh... the ramp problem lies not in doublejump, but in the speedcap: fix
authorfruitiex <fruitiex@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Wed, 10 Feb 2010 18:54:42 +0000 (18:54 +0000)
committerfruitiex <fruitiex@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Wed, 10 Feb 2010 18:54:42 +0000 (18:54 +0000)
that.

git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8630 f962a42d-fe04-0410-a3ab-8c8b0445ebaa

26 files changed:
data/defaultNexuiz.cfg
data/physics10.cfg
data/physics11.cfg
data/physics151.cfg
data/physics151b.cfg
data/physics16rc1.cfg
data/physics20.cfg
data/physics25.cfg
data/physics26.cfg
data/physicsCPMA.cfg
data/physicsHavoc.cfg
data/physicsLzd.cfg
data/physicsNexrun.cfg
data/physicsNexrun_old.cfg
data/physicsNoQWBunny.cfg
data/physicsQ.cfg
data/physicsQ2.cfg
data/physicsQ2a.cfg
data/physicsQ3.cfg
data/physicsQBF.cfg
data/physicsQBFplus.cfg
data/physicsSamual.cfg
data/physicsWarsow.cfg
data/physicsWarsowClassicBunny.cfg
data/physicsWarsowDev.cfg
data/qcsrc/server/cl_physics.qc

index 3737c47..0a59855 100644 (file)
@@ -330,9 +330,9 @@ set sv_player_crouch_maxs "16 16 25" "maxs of a crouched playermodel"
 
 set sv_pogostick 1 "don't require releasing the space bar for jumping again"
 set sv_doublejump 0 "allow Quake 2-style double jumps"
-set sv_doublejump_disable_on_ramps 0 "disable doublejump code on ramps to preserve the old rampjump style"
 set sv_jumpspeedcap_min "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
 set sv_jumpspeedcap_max "" "wont perform a doublejump if z-axis speed is higher than sv_jumpvelocity * this"
+set sv_jumpspeedcap_max_disable_on_ramps 0 "disable max jumpspeedcap on ramps to preserve the old rampjump style"
 
 seta sv_precacheplayermodels 1
 seta sv_precacheweapons 0
index c9a73ce..80d1013 100644 (file)
@@ -26,4 +26,4 @@ sv_doublejump 0
 // 1.0 did not allow re-jumping due to a bug, this is quite close to it
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 22676aa..b3278b7 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0.25
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 4f7a408..76513ea 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index bced8c5..eb43d3f 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 39c6518..4234d0d 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0.2
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index c41f6c8..7c7c4a0 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index a05d943..8df1375 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 0e1910f..19005e9 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 95d08e3..95b34c2 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 0a4138e..7b83e68 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index f858434..0349610 100644 (file)
@@ -26,4 +26,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index c90d1c2..122c89b 100644 (file)
@@ -29,4 +29,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 1
-sv_doublejump_disable_on_ramps 1
+sv_jumpspeedcap_max_disable_on_ramps 1
index b30bf99..6142cf2 100644 (file)
@@ -29,4 +29,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 1
-sv_doublejump_disable_on_ramps 1
+sv_jumpspeedcap_max_disable_on_ramps 1
index 7db8bb5..cb11929 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 1dd7a77..904f2d7 100644 (file)
@@ -26,4 +26,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index c0ae0b2..ecbd2a3 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 3a0a22c..27d77f3 100644 (file)
@@ -26,4 +26,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index ac3f143..6b8d4c1 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 9527b01..2e2d0b5 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index a676f09..f64b2be 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index e382e9c..f4a1840 100644 (file)
@@ -24,4 +24,4 @@ sv_friction_on_land 0
 sv_doublejump 0\r
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 4ab7e5e..eeb919b 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 5b2bc01..0a66f45 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index e50322e..4f7fff9 100644 (file)
@@ -25,4 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
-sv_doublejump_disable_on_ramps 0
+sv_jumpspeedcap_max_disable_on_ramps 0
index 35f37e2..4822b04 100644 (file)
@@ -85,8 +85,14 @@ void PlayerJump (void)
 
        if(cvar_string("sv_jumpspeedcap_min") != "")
                self.velocity_z = max(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_min"), self.velocity_z);
-       if(cvar_string("sv_jumpspeedcap_max") != "")
-               self.velocity_z = min(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_max"), self.velocity_z);
+       if(cvar_string("sv_jumpspeedcap_max") != "") {
+               if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_jumpspeedcap_max_disable_on_ramps")) {
+                       // don't do jump speedcaps on ramps to preserve old nexuiz ramjump style
+                       //print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling speed cap!\n");
+               }
+               else
+                       self.velocity_z = min(cvar("sv_jumpvelocity") * cvar("sv_jumpspeedcap_max"), self.velocity_z);
+       }
 
        if(!(self.lastflags & FL_ONGROUND))
        {
@@ -823,15 +829,9 @@ void SV_PlayerPhysics()
                if(sv_doublejump)
                {
                        tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
-                       if(trace_fraction < 1 && trace_plane_normal_z < 0.98 && cvar("sv_doublejump_disable_on_ramps")) {
-                               // don't do doublejumps on ramps to preserve old nexuiz ramjump style
-                               // print("Trace plane normal z: ", ftos(trace_plane_normal_z), ", disabling dj!\n");
-                       }
-                       else { // perform doublejump
-                               self.flags &~= FL_ONGROUND;
-                               if(trace_fraction < 1 && trace_plane_normal_z > 0.7)
-                                       self.flags |= FL_ONGROUND;
-                       }
+                       self.flags &~= FL_ONGROUND;
+                       if(trace_fraction < 1 && trace_plane_normal_z > 0.7)
+                               self.flags |= FL_ONGROUND;
                }
 
                if (self.BUTTON_JUMP)