| 428 | //------------------------------------------------------------------------------ |
| 429 | |
| 430 | void 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 |
nothing calls this directly
no test coverage detected