mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Reorg of the probe initialization/update code to streamline parts of it, and make it flow more obviously
Added some initial asset stuffs for Das Boot for building out a better testing level.
This commit is contained in:
parent
17cec11b97
commit
a552471e4e
33 changed files with 317 additions and 1821 deletions
|
|
@ -122,24 +122,12 @@ void BoxEnvironmentProbe::onRemove()
|
|||
Parent::onRemove();
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::setTransform(const MatrixF & mat)
|
||||
{
|
||||
// Let SceneObject handle all of the matrix manipulation
|
||||
Parent::setTransform(mat);
|
||||
|
||||
mDirty = true;
|
||||
|
||||
// Dirty our network mask so that the new transform gets
|
||||
// transmitted to the client object
|
||||
setMaskBits(TransformMask);
|
||||
}
|
||||
|
||||
U32 BoxEnvironmentProbe::packUpdate(NetConnection *conn, U32 mask, BitStream *stream)
|
||||
{
|
||||
// Allow the Parent to get a crack at writing its info
|
||||
U32 retMask = Parent::packUpdate(conn, mask, stream);
|
||||
|
||||
if (stream->writeFlag(mask & UpdateMask))
|
||||
if (stream->writeFlag(mask & StaticDataMask))
|
||||
{
|
||||
stream->write(mAtten);
|
||||
}
|
||||
|
|
@ -152,7 +140,7 @@ void BoxEnvironmentProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
// Let the Parent read any info it sent
|
||||
Parent::unpackUpdate(conn, stream);
|
||||
|
||||
if (stream->readFlag()) // UpdateMask
|
||||
if (stream->readFlag()) // StaticDataMask
|
||||
{
|
||||
stream->read(&mAtten);
|
||||
}
|
||||
|
|
@ -164,17 +152,11 @@ void BoxEnvironmentProbe::unpackUpdate(NetConnection *conn, BitStream *stream)
|
|||
|
||||
void BoxEnvironmentProbe::updateProbeParams()
|
||||
{
|
||||
Parent::updateProbeParams();
|
||||
|
||||
mProbeInfo->mProbeShapeType = ProbeRenderInst::Box;
|
||||
mProbeShapeType = ProbeRenderInst::Box;
|
||||
mProbeInfo->mAtten = mAtten;
|
||||
|
||||
PROBEMGR->updateProbes();
|
||||
|
||||
updateCubemaps();
|
||||
}
|
||||
|
||||
void BoxEnvironmentProbe::setPreviewMatParameters(SceneRenderState* renderState, BaseMatInstance* mat)
|
||||
{
|
||||
Parent::setPreviewMatParameters(renderState, mat);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue