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

Method preload

Engine/source/T3D/debris.cpp:270–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270bool DebrisData::preload(bool server, String &errorStr)
271{
272 if (Parent::preload(server, errorStr) == false)
273 return false;
274
275 if( server ) return true;
276
277 if (mShapeAsset.notNull())
278 {
279 if (!mShape)
280 {
281 errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", mShapeAssetId);
282 return false;
283 }
284 else
285 {
286 TSShapeInstance* pDummy = new TSShapeInstance(mShape, !server);
287 delete pDummy;
288 if (!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded())
289 return false;
290 }
291 }
292
293 return true;
294}
295
296void DebrisData::initPersistFields()
297{

Callers

nothing calls this directly

Calls 3

notNullMethod · 0.80
preloadMaterialListMethod · 0.80
getPathMethod · 0.45

Tested by

no test coverage detected