mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-22 15:28:07 +00:00
format codebase
This commit is contained in:
@@ -29,7 +29,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
if (renderComponent == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (fanVolumes.size() == 0 || !self->GetVar<bool>(u"alive")) return;
|
||||
|
||||
if (self->GetVar<bool>(u"on")) {
|
||||
@@ -37,7 +37,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
|
||||
renderComponent->StopEffect("fanOn");
|
||||
self->SetVar<bool>(u"on", false);
|
||||
|
||||
|
||||
for (Entity* volume : fanVolumes) {
|
||||
PhantomPhysicsComponent* volumePhys = static_cast<PhantomPhysicsComponent*>(volume->GetComponent(COMPONENT_TYPE_PHANTOM_PHYSICS));
|
||||
if (!volumePhys) continue;
|
||||
@@ -48,8 +48,7 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
GameMessages::SendPlayAnimation(fxObj, u"trigger");
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!self->GetVar<bool>(u"on") && self->GetVar<bool>(u"alive")) {
|
||||
} else if (!self->GetVar<bool>(u"on") && self->GetVar<bool>(u"alive")) {
|
||||
GameMessages::SendPlayAnimation(self, u"fan-on");
|
||||
|
||||
renderComponent->PlayEffect(495, u"fanOn", "fanOn");
|
||||
@@ -68,8 +67,8 @@ void AgFans::ToggleFX(Entity* self, bool hit) {
|
||||
}
|
||||
}
|
||||
|
||||
void AgFans::OnFireEventServerSide(Entity *self, Entity *sender, std::string args, int32_t param1, int32_t param2,
|
||||
int32_t param3) {
|
||||
void AgFans::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2,
|
||||
int32_t param3) {
|
||||
if (args.length() == 0 || !self->GetVar<bool>(u"alive")) return;
|
||||
|
||||
if ((args == "turnOn" && self->GetVar<bool>(u"on")) || (args == "turnOff" && !self->GetVar<bool>(u"on"))) return;
|
||||
@@ -81,4 +80,4 @@ void AgFans::OnDie(Entity* self, Entity* killer) {
|
||||
ToggleFX(self, true);
|
||||
}
|
||||
self->SetVar<bool>(u"alive", false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user