mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-12-24 14:54:52 +01:00
Cannot cast a Float to Unsigned integer directly on ARM, of sign will be lost, so double cast
This commit is contained in:
parent
553dbe2c62
commit
ead5da376d
2
Sources/Engine/Network/EMsgBuffer.cpp
Normal file → Executable file
2
Sources/Engine/Network/EMsgBuffer.cpp
Normal file → Executable file
|
@ -41,7 +41,7 @@ void AngleToUL(ANGLE3D &Angle,ULONG &ulResult)
|
|||
ubDir = (UBYTE) (AxisAngles(2)/90*127);
|
||||
ulResult = ulResult << 8;
|
||||
ulResult |= ubDir;
|
||||
swAngle = (UWORD) (fRotAngle * 180); // after rounding, angle is precise up to 1/180 degrees (65536/360 ~ 180)
|
||||
swAngle = (UWORD) (SWORD) (fRotAngle * 180); // after rounding, angle is precise up to 1/180 degrees (65536/360 ~ 180)
|
||||
ulResult = (ulResult << 16) | swAngle;
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user