mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-03-04 23:30:56 +00:00
[qcommon] Remove dead serialization code
This commit is contained in:
parent
71a9a5efa6
commit
d047210aca
1 changed files with 0 additions and 45 deletions
|
@ -556,55 +556,10 @@ int MSG_HashKey(const char *string, int maxlen) {
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
=============================================================================
|
|
||||||
|
|
||||||
delta functions
|
|
||||||
|
|
||||||
=============================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern cvar_t *cl_shownet;
|
extern cvar_t *cl_shownet;
|
||||||
|
|
||||||
#define LOG(x) if( cl_shownet && cl_shownet->integer == 4 ) { Com_Printf("%s ", x ); };
|
#define LOG(x) if( cl_shownet && cl_shownet->integer == 4 ) { Com_Printf("%s ", x ); };
|
||||||
|
|
||||||
void MSG_WriteDelta( msg_t *msg, int oldV, int newV, int bits ) {
|
|
||||||
if ( oldV == newV ) {
|
|
||||||
MSG_WriteBits( msg, 0, 1 );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MSG_WriteBits( msg, 1, 1 );
|
|
||||||
MSG_WriteBits( msg, newV, bits );
|
|
||||||
}
|
|
||||||
|
|
||||||
int MSG_ReadDelta( msg_t *msg, int oldV, int bits ) {
|
|
||||||
if ( MSG_ReadBits( msg, 1 ) ) {
|
|
||||||
return MSG_ReadBits( msg, bits );
|
|
||||||
}
|
|
||||||
return oldV;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MSG_WriteDeltaFloat( msg_t *msg, float oldV, float newV ) {
|
|
||||||
floatint_t fi;
|
|
||||||
if ( oldV == newV ) {
|
|
||||||
MSG_WriteBits( msg, 0, 1 );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fi.f = newV;
|
|
||||||
MSG_WriteBits( msg, 1, 1 );
|
|
||||||
MSG_WriteBits( msg, fi.i, 32 );
|
|
||||||
}
|
|
||||||
|
|
||||||
float MSG_ReadDeltaFloat( msg_t *msg, float oldV ) {
|
|
||||||
if ( MSG_ReadBits( msg, 1 ) ) {
|
|
||||||
floatint_t fi;
|
|
||||||
|
|
||||||
fi.i = MSG_ReadBits( msg, 32 );
|
|
||||||
return fi.f;
|
|
||||||
}
|
|
||||||
return oldV;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue