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

Method DestroyShapes

Engine/source/T3D/fx/fxShapeReplicator.cpp:430–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428//------------------------------------------------------------------------------
429
430void fxShapeReplicator::DestroyShapes(void)
431{
432 // Finish if we didn't create any shapes.
433 if (mCurrentShapeCount == 0) return;
434
435 // Remove shapes.
436 for (U32 idx = 0; idx < mCurrentShapeCount; idx++)
437 {
438 fxShapeReplicatedStatic* fxStatic;
439
440 // Fetch the Shape Object.
441 fxStatic = mReplicatedShapes[idx];
442
443 // Got a Shape?
444 if (fxStatic)
445 {
446 // Unlock it.
447 fxStatic->setLocked(false);
448
449 // Unregister the object.
450 fxStatic->unregisterObject();
451
452 // Delete it.
453 delete fxStatic;
454 }
455 }
456
457 // Empty the Replicated Shapes Vector.
458 mReplicatedShapes.clear();
459
460 // Reset Shape Count.
461 mCurrentShapeCount = 0;
462}
463
464//------------------------------------------------------------------------------
465

Callers

nothing calls this directly

Calls 3

setLockedMethod · 0.80
unregisterObjectMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected