Apply 4150 update

This commit is contained in:
Alibek Omarov
2018-06-19 16:22:30 +03:00
parent a539384a76
commit 1e7f9d00c3
40 changed files with 1976 additions and 511 deletions
+2 -2
View File
@@ -284,7 +284,7 @@ void MSG_WriteCoord( sizebuf_t *sb, float val )
{
// g-cont. we loose precision here but keep old size of coord variable!
if( FBitSet( host.features, ENGINE_WRITE_LARGE_COORD ))
MSG_WriteShort( sb, (int)( val * 2.0f ));
MSG_WriteShort( sb, Q_rint( val ));
else MSG_WriteShort( sb, (int)( val * 8.0f ));
}
@@ -598,7 +598,7 @@ float MSG_ReadCoord( sizebuf_t *sb )
{
// g-cont. we loose precision here but keep old size of coord variable!
if( FBitSet( host.features, ENGINE_WRITE_LARGE_COORD ))
return (float)(MSG_ReadShort( sb ) * ( 1.0f / 2.0f ));
return (float)(MSG_ReadShort( sb ));
return (float)(MSG_ReadShort( sb ) * ( 1.0f / 8.0f ));
}