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

Method unpackUpdate

Engine/source/environment/decalRoad.cpp:570–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570void DecalRoad::unpackUpdate( NetConnection *con, BitStream *stream )
571{
572 // Unpack Parent.
573 Parent::unpackUpdate( con, stream );
574
575 // DecalRoadMask
576 if ( stream->readFlag() )
577 {
578 String matName;
579 stream->read( &matName );
580
581 if ( matName != mMaterialName )
582 {
583 mMaterialName = matName;
584 Material *pMat = NULL;
585 if ( !Sim::findObject( mMaterialName, pMat ) )
586 {
587 Con::printf( "DecalRoad::unpackUpdate, failed to find Material of name %s!", mMaterialName.c_str() );
588 }
589 else
590 {
591 mMaterial = pMat;
592 if ( isProperlyAdded() )
593 _initMaterial();
594 }
595 }
596
597 stream->read( &mBreakAngle );
598
599 stream->read( &mSegmentsPerBatch );
600
601 stream->read( &mTextureLength );
602
603 stream->read( &mRenderPriority );
604 }
605
606 // NodeMask
607 if ( stream->readFlag() )
608 {
609 //U32 count = stream->readInt( 16 );
610
611 //mNodes.clear();
612
613 //Point3F pos;
614 //F32 width;
615 //for ( U32 i = 0; i < count; i++ )
616 //{
617 // mathRead( *stream, &pos );
618 // stream->read( &width );
619 // _addNode( pos, width );
620 //}
621
622 if (stream->readFlag())
623 {
624 // Nodes have been passed in this update
625 U32 count = stream->readInt( 16 );
626
627 mNodes.clear();

Callers

nothing calls this directly

Calls 11

printfFunction · 0.85
mathReadFunction · 0.85
readFlagMethod · 0.80
readIntMethod · 0.80
findListByIdMethod · 0.80
registerNotificationMethod · 0.80
isOverlappedMethod · 0.60
findObjectFunction · 0.50
readMethod · 0.45
c_strMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected