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:
parent
8f6771dff4
commit
a08f5e439d
@ -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 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user