MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / update_round

Method update_round

src/SB/Game/zNPCTypePrawn.cpp:811–836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809}
810
811void 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
838void zNPCPrawn::hide_model()
839{

Callers 1

ExitMethod · 0.45

Calls 1

NotifyMethod · 0.45

Tested by

no test coverage detected