[nexuiz-commits] r8624 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Feb 7 08:59:42 EST 2010
Author: div0
Date: 2010-02-07 08:59:42 -0500 (Sun, 07 Feb 2010)
New Revision: 8624
Modified:
trunk/data/qcsrc/server/cl_physics.qc
Log:
fix doublejump speedcap to properly refuse the jump
Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc 2010-02-07 08:25:47 UTC (rev 8623)
+++ trunk/data/qcsrc/server/cl_physics.qc 2010-02-07 13:59:42 UTC (rev 8624)
@@ -89,20 +89,24 @@
mjumpheight = mjumpheight * cvar("g_minstagib_speed_jumpheight");
}
+ if(self.velocity_z >= cvar("sv_doublejump_speedcap") && cvar("sv_doublejump_speedcap")) // try to "fix" the crazy stair jumps by limiting at which z-axis speeds you can perform a doublejump
+ return; // refuse the jump
+
if(!(self.lastflags & FL_ONGROUND))
{
if(cvar("speedmeter"))
dprint(strcat("landing velocity: ", vtos(self.velocity), " (abs: ", ftos(vlen(self.velocity)), ")\n"));
if(self.lastground < time - 0.3)
- self.velocity = self.velocity * (1 - cvar("sv_friction_on_land"));
+ {
+ self.velocity_x *= (1 - cvar("sv_friction_on_land"));
+ self.velocity_y *= (1 - cvar("sv_friction_on_land"));
+ }
if(self.jumppadcount > 1)
dprint(strcat(ftos(self.jumppadcount), "x jumppad combo\n"));
self.jumppadcount = 0;
}
- if(self.velocity_z < cvar("sv_doublejump_speedcap") || !cvar("sv_doublejump_speedcap")) // try to "fix" the crazy stair jumps by limiting at which z-axis speeds you can perform a doublejump
- self.velocity_z = self.velocity_z + mjumpheight;
-
+ self.velocity_z = self.velocity_z + mjumpheight;
self.oldvelocity_z = self.velocity_z;
self.flags &~= FL_ONGROUND;
More information about the nexuiz-commits
mailing list