Fixed friction being applied whilst airborne
Reported by tonibm9 in #1300.
This commit is contained in:
parent
c0a069b260
commit
4019847857
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user