Skip to content

Commit

Permalink
Merge pull request #2299 from madratman/PR/simContinueForTime_fix
Browse files Browse the repository at this point in the history
fix simContinueForTime with updated simPause
  • Loading branch information
madratman committed Nov 6, 2019
2 parents 91be11c + 4e39398 commit 1b10a49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Unreal/Plugins/AirSim/Source/SimMode/SimModeWorldBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,18 @@ void ASimModeWorldBase::pause(bool is_paused)

void ASimModeWorldBase::continueForTime(double seconds)
{
if(physics_world_->isPaused())
{
physics_world_->pause(false);
UGameplayStatics::SetGamePaused(this->GetWorld(), false);
}

physics_world_->continueForTime(seconds);
while(!physics_world_->isPaused())
{
continue;
}
UGameplayStatics::SetGamePaused(this->GetWorld(), true);
}

void ASimModeWorldBase::updateDebugReport(msr::airlib::StateReporterWrapper& debug_reporter)
Expand Down

0 comments on commit 1b10a49

Please sign in to comment.