Fix to CountdownTimer
This commit is contained in:
parent
3e842336d0
commit
fc9bbec5d2
|
@ -22,6 +22,10 @@
|
||||||
"Editor"
|
"Editor"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Name": "OnlineSubsystemSteam",
|
||||||
|
"Enabled": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Name": "Bridge",
|
"Name": "Bridge",
|
||||||
"Enabled": true,
|
"Enabled": true,
|
||||||
|
|
Binary file not shown.
|
@ -225,6 +225,16 @@ void ABlasterPlayerController::SetHUDTime()
|
||||||
else if (MatchState == MatchState::Cooldown) TimeLeft = CooldownTime + WarmupTime + MatchTime - GetServerTime() + LevelStartingTime;
|
else if (MatchState == MatchState::Cooldown) TimeLeft = CooldownTime + WarmupTime + MatchTime - GetServerTime() + LevelStartingTime;
|
||||||
|
|
||||||
uint32 SecondsLeft = FMath::CeilToInt(TimeLeft);
|
uint32 SecondsLeft = FMath::CeilToInt(TimeLeft);
|
||||||
|
|
||||||
|
if (HasAuthority())
|
||||||
|
{
|
||||||
|
BlasterGameMode = BlasterGameMode == nullptr ? Cast<ABlasterGameMode>(UGameplayStatics::GetGameMode(this)) : BlasterGameMode;
|
||||||
|
if (BlasterGameMode)
|
||||||
|
{
|
||||||
|
SecondsLeft = FMath::CeilToInt(BlasterGameMode->GetCountdownTime() + LevelStartingTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (CountdownInt != SecondsLeft)
|
if (CountdownInt != SecondsLeft)
|
||||||
{
|
{
|
||||||
if (MatchState == MatchState::WaitingToStart || MatchState == MatchState::Cooldown)
|
if (MatchState == MatchState::WaitingToStart || MatchState == MatchState::Cooldown)
|
||||||
|
|
Loading…
Reference in New Issue