MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / SendPacket

Function SendPacket

Source/msg.cpp:415–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415void SendPacket(int pnum, const void *packet, size_t dwSize)
416{
417 TFakeCmdPlr cmd;
418
419 if (pnum != sgnCurrMegaPlayer) {
420 sgnCurrMegaPlayer = pnum;
421 cmd.bCmd = FAKE_CMD_SETID;
422 cmd.bPlr = pnum;
423 SendPacket(pnum, &cmd, sizeof(cmd));
424 }
425 if (MegaPktList.back().spaceLeft < dwSize)
426 GetNextPacket();
427
428 TMegaPkt &currMegaPkt = MegaPktList.back();
429 memcpy(currMegaPkt.data + sizeof(currMegaPkt.data) - currMegaPkt.spaceLeft, packet, dwSize);
430 currMegaPkt.spaceLeft -= dwSize;
431}
432
433int WaitForTurns()
434{

Callers 15

OnAddStrengthFunction · 0.70
OnAddMagicFunction · 0.70
OnAddDexterityFunction · 0.70
OnAddVitalityFunction · 0.70
OnGetItemFunction · 0.70
OnAutoGetItemFunction · 0.70
OnItemExtraFunction · 0.70
OnPutItemFunction · 0.70
OnSyncPutItemFunction · 0.70
OnResurrectFunction · 0.70
OnNewLevelFunction · 0.70
OnWarpFunction · 0.70

Calls 1

GetNextPacketFunction · 0.85

Tested by

no test coverage detected