MCPcopy Create free account
hub / github.com/Segs/Segs / sendTargetUpdate

Function sendTargetUpdate

Projects/CoX/Servers/MapServer/EntityUpdateCodec.cpp:316–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316void sendTargetUpdate(const Entity &src,BitStream &bs)
317{
318 uint32_t assist_id = getAssistTargetIdx(src);
319 uint32_t target_id = getTargetIdx(src);
320 bool has_target = (target_id != 0);
321
322 bs.StoreBits(1,has_target);
323 if(!has_target)
324 return;
325
326 bs.StoreBits(1,target_id!=0);
327 if(target_id!=0)
328 bs.StorePackedBits(12,target_id);
329 bs.StoreBits(1,assist_id!=0);
330 if(assist_id!=0)
331 bs.StorePackedBits(12,assist_id);
332}
333
334void sendOnOddSend(const Entity &src,BitStream &bs)
335{

Callers 1

serializetoFunction · 0.85

Calls 4

getAssistTargetIdxFunction · 0.85
getTargetIdxFunction · 0.85
StoreBitsMethod · 0.45
StorePackedBitsMethod · 0.45

Tested by

no test coverage detected