MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / packUpdate

Method packUpdate

Engine/source/T3D/gameBase/gameBase.cpp:521–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521U32 GameBase::packUpdate( NetConnection *connection, U32 mask, BitStream *stream )
522{
523 U32 retMask = Parent::packUpdate( connection, mask, stream );
524
525 if ( stream->writeFlag( mask & ScaleMask ) )
526 {
527 // Only write one bit if the scale is one.
528 if ( stream->writeFlag( mObjScale != Point3F::One ) )
529 mathWrite( *stream, mObjScale );
530 }
531
532 if ( stream->writeFlag( ( mask & DataBlockMask ) && mDataBlock != NULL ) )
533 {
534 stream->writeRangedU32( mDataBlock->getId(),
535 DataBlockObjectIdFirst,
536 DataBlockObjectIdLast );
537 if ( stream->writeFlag( mNetFlags.test( NetOrdered ) ) )
538 stream->writeInt( mOrderGUID, 16 );
539 }
540
541#ifdef TORQUE_DEBUG_NET_MOVES
542 stream->write(mLastMoveId);
543 stream->writeFlag(mIsAiControlled);
544#endif
545
546 return retMask;
547}
548
549void GameBase::unpackUpdate(NetConnection *con, BitStream *stream)
550{

Callers

nothing calls this directly

Calls 7

mathWriteFunction · 0.85
writeRangedU32Method · 0.80
writeIntMethod · 0.80
writeFlagMethod · 0.45
getIdMethod · 0.45
testMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected