------------------------------------------------------------------------------------------------ Tiny helper to remove a single node from its parent' list
| 507 | // ------------------------------------------------------------------------------------------------ |
| 508 | // Tiny helper to remove a single node from its parent' list |
| 509 | void RemoveSingleNodeFromList(aiNode *nd) { |
| 510 | if (!nd || nd->mNumChildren || !nd->mParent) return; |
| 511 | aiNode *par = nd->mParent; |
| 512 | for (unsigned int i = 0; i < par->mNumChildren; ++i) { |
| 513 | if (par->mChildren[i] == nd) { |
| 514 | --par->mNumChildren; |
| 515 | for (; i < par->mNumChildren; ++i) { |
| 516 | par->mChildren[i] = par->mChildren[i + 1]; |
| 517 | } |
| 518 | delete nd; |
| 519 | break; |
| 520 | } |
| 521 | } |
| 522 | } |
| 523 | |
| 524 | // ------------------------------------------------------------------------------------------------ |
| 525 | // Read a multi-part Q3 player model |