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

Method setPersistInfo

Engine/source/lighting/basic/blTerrainSystem.cpp:601–616  ·  view source on GitHub ↗

--------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

599
600//--------------------------------------------------------------------------
601bool blTerrainProxy::setPersistInfo(PersistInfo::PersistChunk * info)
602{
603 if(!Parent::setPersistInfo(info))
604 return(false);
605
606 blTerrainChunk * chunk = dynamic_cast<blTerrainChunk*>(info);
607 AssertFatal(chunk, "blTerrainProxy::setPersistInfo: invalid info chunk!");
608
609 TerrainBlock * terrain = getObject();
610 if(!terrain || !terrain->getLightMap())
611 return(false);
612
613 terrain->setLightMap( new GBitmap( *chunk->mLightmap) );
614
615 return(true);
616}
617
618bool blTerrainProxy::getPersistInfo(PersistInfo::PersistChunk * info)
619{

Callers

nothing calls this directly

Calls 2

getLightMapMethod · 0.80
setLightMapMethod · 0.80

Tested by

no test coverage detected