| 713 | //------------------------------------------------------------------------------ |
| 714 | |
| 715 | void fxShapeReplicator::unpackUpdate(NetConnection * con, BitStream * stream) |
| 716 | { |
| 717 | // Unpack Parent. |
| 718 | Parent::unpackUpdate(con, stream); |
| 719 | |
| 720 | // Read Replication Details. |
| 721 | if(stream->readFlag()) |
| 722 | { |
| 723 | MatrixF ReplicatorObjectMatrix; |
| 724 | |
| 725 | stream->readAffineTransform(&ReplicatorObjectMatrix); // Replication Position. |
| 726 | |
| 727 | mFieldData.mSeed = stream->readInt(32); // Replicator Seed. |
| 728 | mFieldData.mShapeCount = stream->readInt(32); // Shapes Count. |
| 729 | mFieldData.mShapeRetries = stream->readInt(32); // Shapes Retries. |
| 730 | mFieldData.mShapeFile = stream->readSTString(); // Shape File. |
| 731 | mFieldData.mInnerRadiusX = stream->readInt(32); // Shapes Inner Radius X. |
| 732 | mFieldData.mInnerRadiusY = stream->readInt(32); // Shapes Inner Radius Y. |
| 733 | mFieldData.mOuterRadiusX = stream->readInt(32); // Shapes Outer Radius X. |
| 734 | mFieldData.mOuterRadiusY = stream->readInt(32); // Shapes Outer Radius Y. |
| 735 | mathRead(*stream, &mFieldData.mShapeScaleMin); // Shapes Scale Min. |
| 736 | mathRead(*stream, &mFieldData.mShapeScaleMax); // Shapes Scale Max. |
| 737 | mathRead(*stream, &mFieldData.mShapeRotateMin); // Shapes Rotate Min. |
| 738 | mathRead(*stream, &mFieldData.mShapeRotateMax); // Shapes Rotate Max. |
| 739 | mFieldData.mOffsetZ = stream->readSignedInt(32); // Shapes Offset Z. |
| 740 | mFieldData.mAllowOnTerrain = stream->readFlag(); // Allow on Terrain. |
| 741 | mFieldData.mAllowStatics = stream->readFlag(); // Allow on Statics. |
| 742 | mFieldData.mAllowOnWater = stream->readFlag(); // Allow on Water. |
| 743 | mFieldData.mAllowWaterSurface = stream->readFlag(); // Allow on Water Surface. |
| 744 | mFieldData.mAllowedTerrainSlope = stream->readSignedInt(32); // Allowed Terrain Slope. |
| 745 | mFieldData.mAlignToTerrain = stream->readFlag(); // Read AlignToTerrain. |
| 746 | mathRead(*stream, &mFieldData.mTerrainAlignment); // Read Terrain Alignment. |
| 747 | mFieldData.mHideReplications = stream->readFlag(); // Hide Replications. |
| 748 | mFieldData.mInteractions = stream->readFlag(); // Read Interactions. |
| 749 | mFieldData.mShowPlacementArea = stream->readFlag(); // Show Placement Area Flag. |
| 750 | mFieldData.mPlacementBandHeight = stream->readInt(32); // Placement Area Height. |
| 751 | stream->read(&mFieldData.mPlaceAreaColour); |
| 752 | |
| 753 | // Set Transform. |
| 754 | setTransform(ReplicatorObjectMatrix); |
| 755 | |
| 756 | RenewShapes(); |
| 757 | } |
| 758 | } |
| 759 |
nothing calls this directly
no test coverage detected