Find in COMMON.C function void MSG_WriteCoord (sizebuf_t *sb, float f) and change content to: { // jkrige - round to nearest value, rather than rounding toward zero if (f >= 0) MSG_WriteShort (sb, (int)(f * 8.0 + 0.5)); else MSG_WriteShort (sb, (int)(f * 8.0 - 0.5));
//MSG_WriteShort (sb, (int)(f*8)); } Find in COMMON.C function void MSG_WriteAngle (sizebuf_t *sb, float f) and change content to: { // jkrige - rotation smoothing if(/*sv.active &&*/ cls.state != ca_dedicated && !cls.demoplayback && !cls.demorecording && svs.maxclients == 1) { // jkrige - round to nearest value, rather than rounding toward zero if (f >= 0) MSG_WriteShort (sb, (int)(f*(65536.0/360.0) + 0.5) & 65535); else MSG_WriteShort (sb, (int)(f*(65536.0/360.0) - 0.5) & 65535); } else { // jkrige - round to nearest value, rather than rounding toward zero if (f >= 0) MSG_WriteByte (sb, (int)(f*(256.0/360.0) + 0.5) & 255); else MSG_WriteByte (sb, (int)(f*(256.0/360.0) - 0.5) & 255); } //MSG_WriteByte (sb, ((int)f*256/360) & 255); // jkrige - rotation smoothing } Find in COMMON.C function float MSG_ReadAngle (void) and change content to: { // jkrige - rotation smoothing if(/*sv.active &&*/ cls.state != ca_dedicated && !cls.demoplayback && !cls.demorecording && svs.maxclients == 1) { return MSG_ReadShort() * (360.0 / 65536.0); } else { return MSG_ReadChar() * (360.0 / 256.0); } //return MSG_ReadChar() * (360.0/256.0); // jkrige - rotation smoothing }
Log in to post a comment.
Find in COMMON.C function
void MSG_WriteCoord (sizebuf_t *sb, float f)
and change content to:
{
// jkrige - round to nearest value, rather than rounding toward zero
if (f >= 0)
MSG_WriteShort (sb, (int)(f * 8.0 + 0.5));
else
MSG_WriteShort (sb, (int)(f * 8.0 - 0.5));
//MSG_WriteShort (sb, (int)(f*8));
}
Find in COMMON.C function
void MSG_WriteAngle (sizebuf_t *sb, float f)
and change content to:
{
// jkrige - rotation smoothing
if(/*sv.active &&*/ cls.state != ca_dedicated && !cls.demoplayback && !cls.demorecording && svs.maxclients == 1)
{
// jkrige - round to nearest value, rather than rounding toward zero
if (f >= 0)
MSG_WriteShort (sb, (int)(f*(65536.0/360.0) + 0.5) & 65535);
else
MSG_WriteShort (sb, (int)(f*(65536.0/360.0) - 0.5) & 65535);
}
else
{
// jkrige - round to nearest value, rather than rounding toward zero
if (f >= 0)
MSG_WriteByte (sb, (int)(f*(256.0/360.0) + 0.5) & 255);
else
MSG_WriteByte (sb, (int)(f*(256.0/360.0) - 0.5) & 255);
}
//MSG_WriteByte (sb, ((int)f*256/360) & 255);
// jkrige - rotation smoothing
}
Find in COMMON.C function
float MSG_ReadAngle (void)
and change content to:
{
// jkrige - rotation smoothing
if(/*sv.active &&*/ cls.state != ca_dedicated && !cls.demoplayback && !cls.demorecording && svs.maxclients == 1)
{
return MSG_ReadShort() * (360.0 / 65536.0);
}
else
{
return MSG_ReadChar() * (360.0 / 256.0);
}
//return MSG_ReadChar() * (360.0/256.0);
// jkrige - rotation smoothing
}