| 568 | } |
| 569 | |
| 570 | void 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(); |
nothing calls this directly
no test coverage detected