mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
cleaning up some stuff
This commit is contained in:
parent
263eaf03b0
commit
2122448284
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user