move IsDead to the DestroyableComponent

This commit is contained in:
jadebenn
2024-12-24 23:00:49 -06:00
parent 6ed6efa921
commit 81b4f84d03
17 changed files with 24 additions and 30 deletions

View File

@@ -54,7 +54,7 @@ void AgSurvivalBuffStation::OnTimerDone(Entity* self, std::string timerName) {
auto team = self->GetVar<std::vector<LWOOBJID>>(u"BuilderTeam");
for (auto memberID : team) {
auto member = Game::entityManager->GetEntity(memberID);
if (member != nullptr && !member->GetIsDead()) {
if (member != nullptr && !member->GetComponent<DestroyableComponent>()->GetIsDead()) {
GameMessages::SendDropClientLoot(member, self->GetObjectID(), powerupToDrop, 0, self->GetPosition());
}
}