| 590 | } |
| 591 | |
| 592 | xEnt* zNPCMgr::CreateNPC(xEntAsset* asset) |
| 593 | { |
| 594 | zNPCCommon* npc; |
| 595 | en_NPCTYPES nt; |
| 596 | U32 size; |
| 597 | xModelAssetInfo* modelAsset = (xModelAssetInfo*)xSTFindAsset(asset->modelInfoID, &size); |
| 598 | |
| 599 | // FIXME: Replace with actually getting the right model hash from the packed data |
| 600 | nt = this->NPCTypeForModel(modelAsset->BrainID, *(&asset->modelInfoID + 3)); |
| 601 | npc = (zNPCCommon*)npcFactory->CreateItem(nt, NULL, NULL); |
| 602 | |
| 603 | npc->Init(asset); |
| 604 | XOrdAppend(&npclist, npc); |
| 605 | |
| 606 | if (npclist.cnt == npclist.max) |
| 607 | { |
| 608 | XOrdSort(&npclist, zNPCMgr_OrdComp_npcid); |
| 609 | } |
| 610 | |
| 611 | this->DBG_Reset(); |
| 612 | |
| 613 | return npc; |
| 614 | } |
| 615 | |
| 616 | void zNPCMgr::BackdoorUpdateAllNPCsOnce(xScene* xscn, F32 dt) |
| 617 | { |
no test coverage detected