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

@@ -2,13 +2,11 @@
#include "GameMessages.h"
#include "MissionComponent.h"
void NtSleepingGuard::OnStartup(Entity* self)
{
void NtSleepingGuard::OnStartup(Entity* self) {
self->SetNetworkVar<bool>(u"asleep", true);
}
void NtSleepingGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target)
{
void NtSleepingGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity* target) {
if (!self->GetNetworkVar<bool>(u"asleep"))
return;
@@ -23,18 +21,15 @@ void NtSleepingGuard::OnEmoteReceived(Entity* self, const int32_t emote, Entity*
auto* missionComponent = target->GetComponent<MissionComponent>();
if (missionComponent != nullptr)
{
if (missionComponent != nullptr) {
missionComponent->CompleteMission(1346);
}
self->AddTimer("AsleepAgain", 5.0f);
}
void NtSleepingGuard::OnTimerDone(Entity* self, std::string timerName)
{
if (timerName == "AsleepAgain")
{
void NtSleepingGuard::OnTimerDone(Entity* self, std::string timerName) {
if (timerName == "AsleepAgain") {
self->SetNetworkVar<bool>(u"asleep", true);
}
}