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;

View File

@ -9,8 +9,14 @@ class WhFans : public CppScripts::Script
public:
void OnStartup(Entity* self);
void OnDie(Entity* self, Entity* killer);
void OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2,
int32_t param3);
void OnFireEventServerSide(
Entity *self,
Entity *sender,
std::string args,
int32_t param1,
int32_t param2,
int32_t param3
);
private:
void ToggleFX(Entity* self, bool hit);
};