Skip to content
Snippets Groups Projects
Commit 5e9efdc0 authored by Konstantin Kühlem's avatar Konstantin Kühlem
Browse files

Thesis dependend adjustments

parent 286d0abd
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -236,7 +236,7 @@ void UVHMovement::MoveToWaypoint()
}
// if we are at the last waypoint and it defines destroying agent, do so
if (CurrentWaypointIterator == Waypoints.Num() && Waypoints[CurrentWaypointIterator - 1]->GetLastWaypointCommand() == EOnWaypointReach::Destroy)
if (Waypoints.Num() != 0 && CurrentWaypointIterator == Waypoints.Num() && Waypoints[CurrentWaypointIterator - 1]->GetLastWaypointCommand() == EOnWaypointReach::Destroy)
{
VirtualHumanAIController->DestroyAgent();
}
......@@ -310,7 +310,7 @@ void UVHMovement::MoveToWaypoint(FVector TargetLocation, float Speed)
}
Cast<UCharacterMovementComponent>(AVirtualHumanPawn->GetMovementComponent())->MaxWalkSpeed = Speed;
CurrentRequestID = VirtualHumanAIController->MoveToLocation(TargetLocation, false);
CurrentRequestID = VirtualHumanAIController->MoveToLocation(TargetLocation, false, true, true, false, false);
}
void UVHMovement::ChildMoveToWaypoint()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment