cvar that disables doublejump code on ramps for exact old rampjump style
authorfruitiex <fruitiex@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Wed, 10 Feb 2010 18:04:16 +0000 (18:04 +0000)
committerfruitiex <fruitiex@f962a42d-fe04-0410-a3ab-8c8b0445ebaa>
Wed, 10 Feb 2010 18:04:16 +0000 (18:04 +0000)
git-svn-id: svn://svn.icculus.org/nexuiz/trunk@8629 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 72ec433..3737c47 100644 (file)
@@ -330,6 +330,7 @@ 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"
 
index 1514173..c9a73ce 100644 (file)
@@ -26,3 +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
index 01a26ef..22676aa 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0.25
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index b0aa650..4f7a408 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index e14a218..bced8c5 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index cbda5fb..39c6518 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0.2
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index dc780e1..c41f6c8 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 995284f..a05d943 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index be2ba4d..0e1910f 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index f5226b2..95d08e3 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 5b44015..0a4138e 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 9313f25..f858434 100644 (file)
@@ -26,3 +26,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index b88fa7b..c90d1c2 100644 (file)
@@ -29,3 +29,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 1
+sv_doublejump_disable_on_ramps 1
index 96b8cf4..b30bf99 100644 (file)
@@ -29,3 +29,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 1
+sv_doublejump_disable_on_ramps 1
index b79038a..7db8bb5 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 5086fc5..1dd7a77 100644 (file)
@@ -26,3 +26,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 036c31d..c0ae0b2 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index cd25e47..3a0a22c 100644 (file)
@@ -26,3 +26,4 @@ sv_friction_on_land 0
 sv_doublejump 1
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 02ae670..ac3f143 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 668b83f..9527b01 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 00b316f..a676f09 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index e104783..e382e9c 100644 (file)
@@ -24,3 +24,4 @@ sv_friction_on_land 0
 sv_doublejump 0\r
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index fbe6dd3..4ab7e5e 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index d01068e..5b2bc01 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index 353326a..e50322e 100644 (file)
@@ -25,3 +25,4 @@ sv_friction_on_land 0
 sv_doublejump 0
 sv_jumpspeedcap_min ""
 sv_jumpspeedcap_max ""
+sv_doublejump_disable_on_ramps 0
index c8786ab..35f37e2 100644 (file)
@@ -822,10 +822,16 @@ void SV_PlayerPhysics()
        {
                if(sv_doublejump)
                {
-                       self.flags &~= FL_ONGROUND;
                        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.7)
-                               self.flags |= FL_ONGROUND;
+                       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;
+                       }
                }
 
                if (self.BUTTON_JUMP)