MSG_WriteFloat (sb, f);
}
+void MSG_WriteAngle (sizebuf_t *sb, float f, int protocol)
+{
+ if (protocol == PROTOCOL_DARKPLACES5)
+ MSG_WriteAngle16i (sb, f);
+ else
+ MSG_WriteAngle8i (sb, f);
+}
//
// reading functions
float MSG_ReadAngle16i (void)
{
- return MSG_ReadShort () * (360.0/65536.0);
+ return (unsigned short)MSG_ReadShort () * (360.0/65536.0);
}
float MSG_ReadAngle32f (void)
return MSG_ReadFloat ();
}
+float MSG_ReadAngle (int protocol)
+{
+ if (protocol == PROTOCOL_DARKPLACES5)
+ return MSG_ReadAngle16i ();
+ else
+ return MSG_ReadAngle8i ();
+}
+
//===========================================================================
*cur++ = ' ';
*cur++ = ' ';
}
- if ((j & 3) == 0)
+ if ((j & 3) == 3)
*cur++ = ' ';
}
// print text