| 796 | } |
| 797 | |
| 798 | void zNPCSpawner::ChildCleanup(F32 dt) |
| 799 | { |
| 800 | S32 i; |
| 801 | SMNPCStatus* npc_stat; |
| 802 | S32 cnt_know; |
| 803 | S32 cnt_dead; |
| 804 | |
| 805 | if (wavestat == SM_STAT_DONE || wavestat == SM_STAT_ABORT) |
| 806 | { |
| 807 | for (i = actvlist.cnt - 1; i >= 0; i--) |
| 808 | { |
| 809 | zNPCCommon* npc = *(zNPCCommon**)actvlist.list[i]; |
| 810 | npc->Damage(DMGTYP_INSTAKILL, NULL, NULL); |
| 811 | } |
| 812 | |
| 813 | if (actvlist.cnt == 0 && pendlist.cnt == 0) |
| 814 | { |
| 815 | cnt_know = 0; |
| 816 | cnt_dead = 0; |
| 817 | for (i = 0; i < 16; i++) |
| 818 | { |
| 819 | npc_stat = &npcpool[i]; |
| 820 | if (npc_stat->npc != NULL) |
| 821 | { |
| 822 | cnt_know = 1; |
| 823 | if (npc_stat->status == SM_NPC_READY) |
| 824 | { |
| 825 | cnt_dead = 1; |
| 826 | } |
| 827 | break; |
| 828 | } |
| 829 | } |
| 830 | |
| 831 | if (cnt_dead == cnt_know) |
| 832 | { |
| 833 | flg_spawner &= ~0x10; |
| 834 | } |
| 835 | } |
| 836 | |
| 837 | cnt_cleanup++; |
| 838 | } |
| 839 | } |
| 840 | |
| 841 | S32 zMovePoint::IsOn() |
| 842 | { |