MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / OnClientUserMessage

Function OnClientUserMessage

engine/Poseidon/Network/NetworkClient.cpp:657–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

655 {
656 NetworkUpdateInfo& info = oInfo.updates[j];
657 if (info.lastCreatedMsg && ::GlobalTickCount() > info.lastCreatedMsgTime + 5000)
658 {
659 RptF("Client: Network message %x (update info %x) is pending", info.lastCreatedMsgId, &info);
660 info.lastCreatedMsg = nullptr;
661 info.lastCreatedMsgId = 0xFFFFFFFF;
662 info.lastCreatedMsgTime = 0;
663 }
664 }
665 }
666
667 // log all diagnostics
668 WriteDiagOutput(false);
669}
670
671void OnClientUserMessage(char* buffer, int bufferSize, void* context)
672{
673 NetworkClient* client = (NetworkClient*)context;
674
675 bufferSize -= sizeof(int);
676 int crc = *(int*)(buffer + bufferSize);

Callers

nothing calls this directly

Calls 2

CRCMethod · 0.80
DecodeMessageMethod · 0.80

Tested by

no test coverage detected