| 1300 | //------------------------------------------------------------------------------ |
| 1301 | |
| 1302 | void 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 |
nothing calls this directly
no test coverage detected