Fix cheat with walljump

This commit is contained in:
def 2014-06-22 18:07:28 +02:00
parent 22d9f3f146
commit 374bc024bd

View file

@ -604,14 +604,13 @@ void CCharacterCore::Move()
vec2 OldVel = m_Vel; vec2 OldVel = m_Vel;
m_pCollision->MoveBox(&NewPos, &m_Vel, vec2(28.0f, 28.0f), 0); m_pCollision->MoveBox(&NewPos, &m_Vel, vec2(28.0f, 28.0f), 0);
m_Colliding = 0;
if(m_Vel.x < 0.001 && m_Vel.x > -0.001) if(m_Vel.x < 0.001 && m_Vel.x > -0.001)
{ {
if(OldVel.x > 0) if(OldVel.x > 0)
m_Colliding = 1; m_Colliding = 1;
else if(OldVel.x < 0) else if(OldVel.x < 0)
m_Colliding = 2; m_Colliding = 2;
else
m_Colliding = 0;
} }
m_Vel.x = m_Vel.x*(1.0f/RampValue); m_Vel.x = m_Vel.x*(1.0f/RampValue);