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

Method packUpdate

Engine/source/T3D/fx/fxShapeReplicator.cpp:672–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

670//------------------------------------------------------------------------------
671
672U32 fxShapeReplicator::packUpdate(NetConnection * con, U32 mask, BitStream * stream)
673{
674 // Pack Parent.
675 U32 retMask = Parent::packUpdate(con, mask, stream);
676
677 // Write Replication Flag.
678 if (stream->writeFlag(mask & ReplicationMask))
679 {
680 stream->writeAffineTransform(mObjToWorld); // Replicator Position.
681
682 stream->writeInt(mFieldData.mSeed, 32); // Replicator Seed.
683 stream->writeInt(mFieldData.mShapeCount, 32); // Shapes Count.
684 stream->writeInt(mFieldData.mShapeRetries, 32); // Shapes Retries.
685 stream->writeString(mFieldData.mShapeFile);
686 stream->writeInt(mFieldData.mInnerRadiusX, 32); // Shapes Inner Radius X.
687 stream->writeInt(mFieldData.mInnerRadiusY, 32); // Shapes Inner Radius Y.
688 stream->writeInt(mFieldData.mOuterRadiusX, 32); // Shapes Outer Radius X.
689 stream->writeInt(mFieldData.mOuterRadiusY, 32); // Shapes Outer Radius Y.
690 mathWrite(*stream, mFieldData.mShapeScaleMin); // Shapes Scale Min.
691 mathWrite(*stream, mFieldData.mShapeScaleMax); // Shapes Scale Max.
692 mathWrite(*stream, mFieldData.mShapeRotateMin); // Shapes Rotate Min.
693 mathWrite(*stream, mFieldData.mShapeRotateMax); // Shapes Rotate Max.
694 stream->writeSignedInt(mFieldData.mOffsetZ, 32); // Shapes Offset Z.
695 stream->writeFlag(mFieldData.mAllowOnTerrain); // Allow on Terrain.
696 stream->writeFlag(mFieldData.mAllowStatics); // Allow on Statics.
697 stream->writeFlag(mFieldData.mAllowOnWater); // Allow on Water.
698 stream->writeFlag(mFieldData.mAllowWaterSurface); // Allow on Water Surface.
699 stream->writeSignedInt(mFieldData.mAllowedTerrainSlope, 32); // Shapes Offset Z.
700 stream->writeFlag(mFieldData.mAlignToTerrain); // Shapes AlignToTerrain.
701 mathWrite(*stream, mFieldData.mTerrainAlignment); // Write Terrain Alignment.
702 stream->writeFlag(mFieldData.mHideReplications); // Hide Replications.
703 stream->writeFlag(mFieldData.mInteractions); // Shape Interactions.
704 stream->writeFlag(mFieldData.mShowPlacementArea); // Show Placement Area Flag.
705 stream->writeInt(mFieldData.mPlacementBandHeight, 32); // Placement Area Height.
706 stream->write(mFieldData.mPlaceAreaColour);
707 }
708
709 // Were done ...
710 return(retMask);
711}
712
713//------------------------------------------------------------------------------
714

Callers

nothing calls this directly

Calls 7

mathWriteFunction · 0.85
writeAffineTransformMethod · 0.80
writeIntMethod · 0.80
writeSignedIntMethod · 0.80
writeFlagMethod · 0.45
writeStringMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected