]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix bug in parsing PROTOCOL_DARKPLACES1/2/3/4 angles
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 2 Jul 2005 11:03:25 +0000 (11:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 2 Jul 2005 11:03:25 +0000 (11:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5481 d7cf8633-e32d-0410-b094-e92efae38249

protocol.c

index f3301f583f9e7987e54dcfa58aa89627fa64c00b..7ae6db28d62ee4b4a34a9b365538f5bea4a73455 100644 (file)
@@ -639,23 +639,23 @@ void EntityState_ReadFields(entity_state_t *e, unsigned int bits)
                                e->origin[2] = MSG_ReadCoord32f();
                }
        }
-       if ((cl.protocol == PROTOCOL_DARKPLACES1 || cl.protocol == PROTOCOL_DARKPLACES2 || cl.protocol == PROTOCOL_DARKPLACES3 || cl.protocol == PROTOCOL_DARKPLACES4) && (e->flags & RENDER_LOWPRECISION))
+       if ((cl.protocol == PROTOCOL_DARKPLACES5 || cl.protocol == PROTOCOL_DARKPLACES6) && !(e->flags & RENDER_LOWPRECISION))
        {
                if (bits & E_ANGLE1)
-                       e->angles[0] = MSG_ReadAngle8i();
+                       e->angles[0] = MSG_ReadAngle16i();
                if (bits & E_ANGLE2)
-                       e->angles[1] = MSG_ReadAngle8i();
+                       e->angles[1] = MSG_ReadAngle16i();
                if (bits & E_ANGLE3)
-                       e->angles[2] = MSG_ReadAngle8i();
+                       e->angles[2] = MSG_ReadAngle16i();
        }
        else
        {
                if (bits & E_ANGLE1)
-                       e->angles[0] = MSG_ReadAngle16i();
+                       e->angles[0] = MSG_ReadAngle8i();
                if (bits & E_ANGLE2)
-                       e->angles[1] = MSG_ReadAngle16i();
+                       e->angles[1] = MSG_ReadAngle8i();
                if (bits & E_ANGLE3)
-                       e->angles[2] = MSG_ReadAngle16i();
+                       e->angles[2] = MSG_ReadAngle8i();
        }
        if (bits & E_MODEL1)
                e->modelindex = (e->modelindex & 0xFF00) | (unsigned int) MSG_ReadByte();