mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
Fix wrong calculation of weapon Angle in demo player
This commit is contained in:
parent
2afaba17bb
commit
670a028815
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue