format codebase

This commit is contained in:
aronwk-aaron
2022-07-28 08:39:57 -05:00
parent 4f7aa11067
commit 19e77a38d8
881 changed files with 34700 additions and 38689 deletions

View File

@@ -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);
}
}