]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
MSG_ReadAngle functions now return -180 to +180 range instead of 0-360 range which...
[xonotic/darkplaces.git] / common.c
index 5c72b72f1dcbe51fe3b99574b9317234af0372ec..3351fd8898d70f3c954cc95eaf44b7cc06fe1e74 100644 (file)
--- a/common.c
+++ b/common.c
@@ -405,12 +405,12 @@ void MSG_ReadVector (float *v, int protocol)
 // LordHavoc: round to nearest value, rather than rounding toward zero, fixes crosshair problem
 float MSG_ReadAngle8i (void)
 {
-       return MSG_ReadByte () * (360.0/256.0);
+       return (signed char) MSG_ReadByte () * (360.0/256.0);
 }
 
 float MSG_ReadAngle16i (void)
 {
-       return (unsigned short)MSG_ReadShort () * (360.0/65536.0);
+       return (signed short)MSG_ReadShort () * (360.0/65536.0);
 }
 
 float MSG_ReadAngle32f (void)