Cannot cast a Float to Unsigned integer directly on ARM, of sign will be lost, so double cast

This commit is contained in:
ptitSeb 2016-04-06 22:43:08 +02:00
parent 553dbe2c62
commit ead5da376d

2
Sources/Engine/Network/EMsgBuffer.cpp Normal file → Executable file
View File

@ -41,7 +41,7 @@ void AngleToUL(ANGLE3D &Angle,ULONG &ulResult)
ubDir = (UBYTE) (AxisAngles(2)/90*127); ubDir = (UBYTE) (AxisAngles(2)/90*127);
ulResult = ulResult << 8; ulResult = ulResult << 8;
ulResult |= ubDir; 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; ulResult = (ulResult << 16) | swAngle;
}; };