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

Method packUpdate

Engine/source/T3D/fx/fxShapeReplicator.cpp:673–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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