Files
Project-Reboot-3.0/Project Reboot 3.0/GameState.cpp
2023-03-20 18:33:36 -04: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;
}