Files
Reboot-Launcher/dependencies/reboot/Project Reboot 3.0/GameState.cpp
Alessandro Autiero b41e22adeb <feat: New project structure>
<feat: New release>
2023-09-02 15:34:15 +02:00

17 lines
381 B
C++

#include "GameState.h"
#include "GameplayStatics.h"
#include "reboot.h"
float AGameState::GetServerWorldTimeSeconds()
{
UWorld* World = GetWorld();
if (World)
{
static auto ServerWorldTimeSecondsDeltaOffset = this->GetOffset("ServerWorldTimeSecondsDelta");
return UGameplayStatics::GetTimeSeconds(World) + Get<float>(ServerWorldTimeSecondsDeltaOffset);
}
return 0.f;
}