Skip to content

Commit ffeec4c

Browse files
committed
Update KBEngine.cs
1 parent 302eb24 commit ffeec4c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

KBEngine.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2857,19 +2857,19 @@ private void _updateVolatileData(Int32 entityID, float x, float y, float z, floa
28572857
if(roll != KBEDATATYPE_BASE.KBE_FLT_MAX)
28582858
{
28592859
changeDirection = true;
2860-
entity.direction.x = KBEMath.int82angle((SByte)roll, false) * 360 / ((float)System.Math.PI * 2);
2860+
entity.direction.x = (isOptimized ? KBEMath.int82angle((SByte)roll, false) : roll) * 360 / ((float)System.Math.PI * 2);
28612861
}
28622862

28632863
if(pitch != KBEDATATYPE_BASE.KBE_FLT_MAX)
28642864
{
28652865
changeDirection = true;
2866-
entity.direction.y = KBEMath.int82angle((SByte)pitch, false) * 360 / ((float)System.Math.PI * 2);
2866+
entity.direction.y = (isOptimized ? KBEMath.int82angle((SByte)pitch, false) : pitch) * 360 / ((float)System.Math.PI * 2);
28672867
}
28682868

28692869
if(yaw != KBEDATATYPE_BASE.KBE_FLT_MAX)
28702870
{
28712871
changeDirection = true;
2872-
entity.direction.z = KBEMath.int82angle((SByte)yaw, false) * 360 / ((float)System.Math.PI * 2);
2872+
entity.direction.z = (isOptimized ? KBEMath.int82angle((SByte)yaw, false) : yaw) * 360 / ((float)System.Math.PI * 2);
28732873
}
28742874

28752875
bool done = false;

0 commit comments

Comments
 (0)