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

Method unpackUpdate

Engine/source/environment/decalRoad.cpp:576–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void DecalRoad::unpackUpdate( NetConnection *con, BitStream *stream )
577{
578 // Unpack Parent.
579 Parent::unpackUpdate( con, stream );
580
581 // DecalRoadMask
582 if ( stream->readFlag() )
583 {
584 UNPACK_ASSET(con, Material);
585
586 if (isProperlyAdded())
587 _initMaterial();
588
589 stream->read( &mBreakAngle );
590
591 stream->read( &mSegmentsPerBatch );
592
593 stream->read( &mTextureLength );
594
595 stream->read( &mRenderPriority );
596 }
597
598 // NodeMask
599 if ( stream->readFlag() )
600 {
601 //U32 count = stream->readInt( 16 );
602
603 //mNodes.clear();
604
605 //Point3F pos;
606 //F32 width;
607 //for ( U32 i = 0; i < count; i++ )
608 //{
609 // mathRead( *stream, &pos );
610 // stream->read( &width );
611 // _addNode( pos, width );
612 //}
613
614 if (stream->readFlag())
615 {
616 // Nodes have been passed in this update
617 U32 count = stream->readInt( 16 );
618
619 mNodes.clear();
620
621 Point3F pos;
622 F32 width;
623 for ( U32 i = 0; i < count; i++ )
624 {
625 mathRead( *stream, &pos );
626 stream->read( &width );
627 _addNode( pos, width );
628 }
629 }
630 else
631 {
632 // Nodes will arrive as events
633 U32 id;

Callers

nothing calls this directly

Calls 8

mathReadFunction · 0.85
readFlagMethod · 0.80
readIntMethod · 0.80
findListByIdMethod · 0.80
registerNotificationMethod · 0.80
isOverlappedMethod · 0.60
readMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected