Fix rope bug

This commit is contained in:
Lwmte 2021-10-08 16:16:17 +03:00
parent 8d958794a5
commit 75aa10db69

View file

@ -412,10 +412,7 @@ namespace TEN::Game::Rope
void ApplyVelocityToRope(int node, short angle, short n)
{
SetPendulumVelocity(
(unsigned short)n * phd_sin(angle) * 4096,
0,
(unsigned short)n * phd_cos(angle) * 4096); /* @ORIGINAL_BUG: casting n to unsigned short results in the rope glitch */
SetPendulumVelocity(n * phd_sin(angle) * 4096, 0, n * phd_cos(angle) * 4096);
}
void SetPendulumVelocity(int x, int y, int z)