MCPcopy Create free account
hub / github.com/JACoders/OpenJK / MSG_WriteEntity

Function MSG_WriteEntity

code/qcommon/msg.cpp:808–821  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806
807extern serverStatic_t svs;
808void MSG_WriteEntity( msg_t *msg, struct entityState_s *to, int removeNum)
809{
810
811 if ( to == NULL ) {
812 MSG_WriteBits(msg, removeNum, GENTITYNUM_BITS);
813 MSG_WriteBits(msg, 1, 1); //removed
814 return;
815 } else {
816 MSG_WriteBits(msg, to->number, GENTITYNUM_BITS);
817 MSG_WriteBits(msg, 0, 1); //not removed
818 }
819 assert(( to - svs.snapshotEntities ) >= 0 && ( to - svs.snapshotEntities ) < 512);
820 MSG_WriteLong(msg, to - svs.snapshotEntities);
821}
822
823void MSG_ReadEntity( msg_t *msg, entityState_t *to)
824{

Callers 1

SV_EmitPacketEntitiesFunction · 0.85

Calls 2

MSG_WriteBitsFunction · 0.70
MSG_WriteLongFunction · 0.70

Tested by

no test coverage detected