cleaning up some stuff

This commit is contained in:
Aaron Kimbre
2022-04-17 21:30:25 -05:00
parent 263eaf03b0
commit 2122448284
2 changed files with 9 additions and 7 deletions

View File

@@ -17,13 +17,9 @@ void WhFans::ToggleFX(Entity* self, bool hit) {
fanGroup = "";
}
Game::logger->Log("WhFans", "Toggling FX for Fan Group(%s)\n", fanGroup.c_str());
std::vector<Entity*> fanVolumes = EntityManager::Instance()->GetEntitiesInGroup(fanGroup);
auto renderComponent = self->GetComponent<RenderComponent>();
if (renderComponent == nullptr) {
return;
}
auto* renderComponent = static_cast<RenderComponent*>(self->GetComponent(COMPONENT_TYPE_RENDER));
if (fanVolumes.size() == 0 || !self->GetVar<bool>(u"alive")) return;