Restored time dilation when BugPlacerPawn is active, since it seems the freezing that occurred was related to bad NVidia drivers and not frame times hitting zero.
This commit is contained in:
@@ -162,13 +162,18 @@ void ABugPlacerPawn::Activate()
|
||||
|
||||
UGameplayStatics::GetPlayerController(this, 0)->Possess(this);
|
||||
|
||||
float TraceInterval = this->GetActorTickInterval() > 0.0f ? this->GetActorTickInterval() : 1.0f / 60.0f;
|
||||
const float &MinTimeDilation = this->GetWorldSettings()->MinGlobalTimeDilation;
|
||||
this->GetWorldSettings()->SetTimeDilation(MinTimeDilation);
|
||||
this->CustomTimeDilation = 1.0 / MinTimeDilation;
|
||||
|
||||
float TraceInterval = this->GetActorTickInterval() > 0.0f ? this->GetActorTickInterval() : (1.0f / 60.0f) * MinTimeDilation;
|
||||
this->GetWorldTimerManager().SetTimer(this->TraceTimerHandle, this, &ABugPlacerPawn::TraceTimerElapsed, TraceInterval, true);
|
||||
}
|
||||
|
||||
void ABugPlacerPawn::Deactivate()
|
||||
{
|
||||
this->GetWorldTimerManager().ClearAllTimersForObject(this);
|
||||
this->GetWorldSettings()->SetTimeDilation(1.0f);
|
||||
|
||||
UGameplayStatics::GetPlayerController(this, 0)->Possess(this->OriginalPlayer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user