From: havoc Date: Mon, 4 Oct 2004 21:13:49 +0000 (+0000) Subject: MSG_ReadAngle functions now return -180 to +180 range instead of 0-360 range which... X-Git-Tag: xonotic-v0.1.0preview~5526 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=990e8af87bf535d6349883bbf1f755b71d2e74c3;p=xonotic%2Fdarkplaces.git MSG_ReadAngle functions now return -180 to +180 range instead of 0-360 range which should fix glitches with player model pitch when looking down git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4591 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.c b/common.c index 5c72b72f..3351fd88 100644 --- 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)