Fix wrong calculation of weapon Angle in demo player

This commit is contained in:
user578 2015-11-13 23:38:49 +03:00
parent 2afaba17bb
commit 670a028815

View file

@ -417,6 +417,17 @@ void CPlayers::RenderPlayer(
} }
else else
{ {
// fix wrong calculation of weapon Angle in demo player
if (Player.m_Angle > 800 && Prev.m_Angle < 0)
{
Player.m_Angle -= 1600;
Angle = mix((float)Prev.m_Angle, (float)Player.m_Angle, IntraTick) / 256.0f;
}
else if (Player.m_Angle < 0 && Prev.m_Angle > 800)
{
Player.m_Angle += 1600;
Angle = mix((float)Prev.m_Angle, (float)Player.m_Angle, IntraTick) / 256.0f;
}
/* /*
float mixspeed = Client()->FrameTime()*2.5f; float mixspeed = Client()->FrameTime()*2.5f;
if(player.attacktick != prev.attacktick) // shooting boosts the mixing speed if(player.attacktick != prev.attacktick) // shooting boosts the mixing speed