MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / handleTransferFlag

Function handleTransferFlag

src/clientbase/playing.cpp:1481–1493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1479
1480
1481void handleTransferFlag(void* msg) {
1482 PlayerId fromId, toId;
1483 unsigned short flagIndex;
1484 msg = nboUnpackUInt8(msg, fromId);
1485 msg = nboUnpackUInt8(msg, toId);
1486 msg = nboUnpackUInt16(msg, flagIndex);
1487 msg = world->getFlag(int(flagIndex)).unpack(msg);
1488 unsigned char t = 0;
1489 msg = nboUnpackUInt8(msg, t);
1490 Player* fromTank = lookupPlayer(fromId);
1491 Player* toTank = lookupPlayer(toId);
1492 handleFlagTransferred(fromTank, toTank, flagIndex, (ShotType)t);
1493}
1494
1495
1496void handleMsgSetVars(void* msg) {

Callers 1

handleServerMessageFunction · 0.85

Calls 6

nboUnpackUInt8Function · 0.85
nboUnpackUInt16Function · 0.85
getFlagMethod · 0.80
lookupPlayerFunction · 0.70
handleFlagTransferredFunction · 0.50
unpackMethod · 0.45

Tested by

no test coverage detected