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

Method onRemove

Engine/source/T3D/fx/fxFoliageReplicator.cpp:1302–1326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1300//------------------------------------------------------------------------------
1301
1302void fxFoliageReplicator::onRemove()
1303{
1304 // Remove the Replicator from the Replicator Set.
1305 dynamic_cast<SimSet*>(Sim::findObject("fxFoliageSet"))->removeObject(this);
1306
1307 NetConnection::smGhostAlwaysDone.remove( this, &fxFoliageReplicator::onGhostAlwaysDone );
1308
1309 // Remove from Scene.
1310 removeFromScene();
1311
1312 // Are we on the Client?
1313 if (isClientObject())
1314 {
1315 // Yes, so destroy Foliage.
1316 DestroyFoliage();
1317
1318 // Remove Texture.
1319 mFieldData.mFoliageTexture = NULL;
1320
1321 mShader = NULL;
1322 }
1323
1324 // Do Parent.
1325 Parent::onRemove();
1326}
1327
1328//------------------------------------------------------------------------------
1329

Callers

nothing calls this directly

Calls 3

findObjectFunction · 0.50
removeObjectMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected