MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / write

Method write

Engine/source/sim/netGhost.cpp:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85 }
86 void write(NetConnection *ps, BitStream *bstream)
87 {
88 bstream->writeInt(ghostIndex, NetConnection::GhostIdBitSize);
89 if(bstream->writeFlag(validObject))
90 {
91 S32 classId = object->getClassId(ps->getNetClassGroup());
92 bstream->writeClassId(classId, NetClassTypeObject, ps->getNetClassGroup());
93#ifdef TORQUE_NET_STATS
94 U32 beginSize = bstream->getBitPosition();
95#endif
96 U32 retMask = object->packUpdate(ps, 0xFFFFFFFF, bstream);
97 if ( retMask != 0 ) object->setMaskBits( retMask );
98#ifdef TORQUE_NET_STATS
99 object->getClassRep()->updateNetStatPack(0xFFFFFFFF, bstream->getBitPosition() - beginSize);
100#endif
101 }
102 }
103 void unpack(NetConnection *ps, BitStream *bstream)
104 {
105 ghostIndex = bstream->readInt(NetConnection::GhostIdBitSize);

Callers 1

ghostWriteStartBlockMethod · 0.45

Calls 10

writeIntMethod · 0.80
getNetClassGroupMethod · 0.80
writeClassIdMethod · 0.80
getBitPositionMethod · 0.80
updateNetStatPackMethod · 0.80
getClassRepMethod · 0.80
writeFlagMethod · 0.45
getClassIdMethod · 0.45
packUpdateMethod · 0.45
setMaskBitsMethod · 0.45

Tested by

no test coverage detected