| 809 | } |
| 810 | |
| 811 | void zNPCPrawn::update_round() |
| 812 | { |
| 813 | S32 life = this->life; |
| 814 | if (life == 0) |
| 815 | { |
| 816 | this->round = 3; |
| 817 | } |
| 818 | else |
| 819 | { |
| 820 | this->round = 2 - (S32)((life - 1) * 3) / this->cfg_npc->pts_damage; |
| 821 | } |
| 822 | S32 spawnerCount = sizeof(this->spawner) / sizeof(*this->spawner); |
| 823 | for (S32 spawnerIndex = 0; spawnerIndex < spawnerCount; spawnerIndex++) |
| 824 | { |
| 825 | zNPCSpawner* current_spawner = this->spawner[spawnerIndex]; |
| 826 | if (current_spawner != NULL) |
| 827 | { |
| 828 | en_SM_NOTICES spawnerNotice = SM_NOTE_DUPRESUME; |
| 829 | if (spawnerIndex > this->round) |
| 830 | { |
| 831 | spawnerNotice = SM_NOTE_DUPPAUSE; |
| 832 | } |
| 833 | current_spawner->Notify(spawnerNotice, NULL); |
| 834 | } |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | void zNPCPrawn::hide_model() |
| 839 | { |