1
0

Fixed friction being applied whilst airborne

Reported by tonibm9 in #1300.
This commit is contained in:
Tiger Wang 2014-09-12 20:50:24 +01:00
parent c0a069b260
commit 4019847857

View File

@ -941,8 +941,9 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
}
NextSpeed.y += fallspeed;
}
// Friction
else
{
// Friction on ground
if (NextSpeed.SqrLength() > 0.0004f)
{
NextSpeed.x *= 0.7f / (1 + a_Dt);
@ -956,6 +957,7 @@ void cEntity::HandlePhysics(float a_Dt, cChunk & a_Chunk)
NextSpeed.z = 0;
}
}
}
// Adjust X and Z speed for COBWEB temporary. This speed modification should be handled inside block handlers since we
// might have different speed modifiers according to terrain.