mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
llamas, fix some ltm specific stuff, add auto bus start for auto restart, work in progress lategame on 1.11, fix a crash, performance
30 lines
999 B
C++
30 lines
999 B
C++
#include "FortSafeZoneIndicator.h"
|
|
|
|
#include "FortGameModeAthena.h"
|
|
#include "reboot.h"
|
|
|
|
void AFortSafeZoneIndicator::SkipShrinkSafeZone()
|
|
{
|
|
auto GameState = Cast<AFortGameStateAthena>(((AFortGameMode*)GetWorld()->GetGameMode())->GetGameState());
|
|
|
|
GetSafeZoneStartShrinkTime() = GameState->GetServerWorldTimeSeconds();
|
|
GetSafeZoneFinishShrinkTime() = GameState->GetServerWorldTimeSeconds() + 0.2;
|
|
}
|
|
|
|
void AFortSafeZoneIndicator::OnSafeZoneStateChangeHook(AFortSafeZoneIndicator* SafeZoneIndicator, EFortSafeZoneState NewState, bool bInitial)
|
|
{
|
|
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
|
|
|
LOG_INFO(LogDev, "OnSafeZoneStateChangeHook!");
|
|
|
|
if (NewState == EFortSafeZoneState::Shrinking)
|
|
{
|
|
GameState->SetGamePhaseStep(EAthenaGamePhaseStep::StormShrinking);
|
|
}
|
|
else if (NewState == EFortSafeZoneState::Holding)
|
|
{
|
|
GameState->SetGamePhaseStep(EAthenaGamePhaseStep::StormHolding);
|
|
}
|
|
|
|
return OnSafeZoneStateChangeOriginal(SafeZoneIndicator, NewState, bInitial);
|
|
} |