MCPcopy Create free account
hub / github.com/ddnet/ddnet / OnDemoPlayerMessage

Method OnDemoPlayerMessage

src/engine/client/client.cpp:2667–2686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2665}
2666
2667void CClient::OnDemoPlayerMessage(void *pData, int Size)
2668{
2669 CUnpacker Unpacker;
2670 Unpacker.Reset(pData, Size);
2671 CMsgPacker Packer(NETMSG_EX, true);
2672
2673 // unpack msgid and system flag
2674 int Msg;
2675 bool Sys;
2676 CUuid Uuid;
2677
2678 int Result = UnpackMessageId(&Msg, &Sys, &Uuid, &Unpacker, &Packer);
2679 if(Result == UNPACKMESSAGE_ERROR)
2680 {
2681 return;
2682 }
2683
2684 if(!Sys)
2685 GameClient()->OnMessage(Msg, &Unpacker, CONN_MAIN, false);
2686}
2687
2688void CClient::UpdateDemoIntraTimers()
2689{

Callers

nothing calls this directly

Calls 3

UnpackMessageIdFunction · 0.85
ResetMethod · 0.45
OnMessageMethod · 0.45

Tested by

no test coverage detected