mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
format codebase
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
#include "RebuildComponent.h"
|
||||
#include "Character.h"
|
||||
|
||||
void NjRailActivatorsServer::OnUse(Entity *self, Entity *user) {
|
||||
const auto flag = self->GetVar<int32_t>(u"RailFlagNum");
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
void NjRailActivatorsServer::OnUse(Entity* self, Entity* user) {
|
||||
const auto flag = self->GetVar<int32_t>(u"RailFlagNum");
|
||||
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
|
||||
|
||||
// Only allow use if this is not a quick build or the quick build is built
|
||||
if (rebuildComponent == nullptr || rebuildComponent->GetState() == REBUILD_COMPLETED) {
|
||||
auto* character = user->GetCharacter();
|
||||
if (character != nullptr) {
|
||||
character->SetPlayerFlag(flag, true);
|
||||
}
|
||||
}
|
||||
// Only allow use if this is not a quick build or the quick build is built
|
||||
if (rebuildComponent == nullptr || rebuildComponent->GetState() == REBUILD_COMPLETED) {
|
||||
auto* character = user->GetCharacter();
|
||||
if (character != nullptr) {
|
||||
character->SetPlayerFlag(flag, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user