Remove network compression on floats

This commit is contained in:
Kamay Xutax 2024-01-22 22:08:54 +01:00
parent e9a949d806
commit a72e160350

View file

@ -375,6 +375,10 @@ SendProp SendPropFloat(
{
SendProp ret;
// Remove float compression to avoid errors
flags = SPROP_NOSCALE;
nBits = 32;
if ( varProxy == SendProxy_FloatToFloat )
{
Assert( sizeofVar == 0 || sizeofVar == 4 );
@ -425,6 +429,10 @@ SendProp SendPropVector(
{
SendProp ret;
// Remove float compression to avoid errors
flags = SPROP_NOSCALE;
nBits = 32;
if(varProxy == SendProxy_VectorToVector)
{
Assert(sizeofVar == sizeof(Vector));
@ -461,6 +469,10 @@ SendProp SendPropVectorXY(
{
SendProp ret;
// Remove float compression to avoid errors
flags = SPROP_NOSCALE;
nBits = 32;
if(varProxy == SendProxy_VectorXYToVectorXY)
{
Assert(sizeofVar == sizeof(Vector));
@ -538,6 +550,10 @@ SendProp SendPropAngle(
Assert(sizeofVar == 4);
}
// Remove float compression to avoid errors
flags = SPROP_NOSCALE;
nBits = 32;
if ( nBits == 32 )
flags |= SPROP_NOSCALE;
@ -571,6 +587,10 @@ SendProp SendPropQAngles(
Assert(sizeofVar == 4);
}
// Remove float compression to avoid errors
flags = SPROP_NOSCALE;
nBits = 32;
if ( nBits == 32 )
flags |= SPROP_NOSCALE;