]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
MSG_ReadAngle functions now return -180 to +180 range instead of 0-360 range which...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Oct 2004 21:13:49 +0000 (21:13 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 4 Oct 2004 21:13:49 +0000 (21:13 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4591 d7cf8633-e32d-0410-b094-e92efae38249

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)