2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2025-01-21 07:50:47 +01:00

engine: common: net_encode: fix comparing DT_TIMEWINDOW_* fields

Fixes: 35783bcec241 ("engine: common: net_encode: fix inaccuracy in DT_TIMEWINDOW_* encoding")
This commit is contained in:
Alibek Omarov 2024-04-19 01:49:37 +03:00
parent 8f6771dff4
commit a08f5e439d

View File

@ -1079,15 +1079,15 @@ static qboolean Delta_CompareField( delta_t *pField, void *from, void *to, doubl
{
val_a = *(float *)((byte *)from + pField->offset );
val_b = *(float *)((byte *)to + pField->offset );
fromF = Q_rint(( timebase - val_a ) * 100.0 );
toF = Q_rint(( timebase - val_b ) * 100.0 );
fromF = Q_rint( val_a * 100.0 );
toF = Q_rint( val_b * 100.0 );
}
else if( pField->flags & DT_TIMEWINDOW_BIG )
{
val_a = *(float *)((byte *)from + pField->offset );
val_b = *(float *)((byte *)to + pField->offset );
fromF = Q_rint(( timebase - val_a ) * pField->multiplier );
toF = Q_rint(( timebase - val_b ) * pField->multiplier );
fromF = Q_rint( val_a * pField->multiplier );
toF = Q_rint( val_b * pField->multiplier );
}
else if( pField->flags & DT_STRING )
{