use shoe level instead of eyeheight

for edge jump detection
This commit is contained in:
ac-stef
2016-10-13 15:29:47 +02:00
parent 0e425d2103
commit 41ff4cf583
+2 -2
View File
@@ -528,8 +528,8 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
if(pl->jumpnext)
{
pl->jumpnext = false;
bool doublejump = pl->lastjump && lastmillis - pl->lastjump < 250 && pl->strafe != 0 && pl->o.z - pl->lastjumpheight > 0.2f;
pl->lastjumpheight = pl->o.z;
bool doublejump = pl->lastjump && lastmillis - pl->lastjump < 250 && pl->strafe != 0 && pl->o.z - pl->eyeheight - pl->lastjumpheight > 0.2f;
pl->lastjumpheight = pl->o.z - pl->eyeheight;
pl->vel.z = 2.0f; // physics impulse upwards
if(doublejump && curfullspeed > 0.1f) // more velocity on double jump
{