Skip to content
Snippets Groups Projects
Commit 8c628451 authored by Timon Römer's avatar Timon Römer
Browse files

Changes copy to reference in actor loop

parent 1805c823
No related branches found
No related tags found
2 merge requests!81Inten Select 5.3,!80UE5.3-2023.1-rc2
Pipeline #371817 passed
......@@ -3,6 +3,7 @@
#include "EnhancedInputSubsystems.h"
#include "Components/WidgetComponent.h"
#include "Haptics/HapticFeedbackEffect_Curve.h"
#include "Kismet/GameplayStatics.h"
#include "Materials/MaterialParameterCollection.h"
#include "Materials/MaterialParameterCollectionInstance.h"
#include "Misc/MessageDialog.h"
......@@ -413,7 +414,7 @@ UIntenSelectable* UIntenSelectComponent::GetMaxScoreActor(const float DeltaTime)
auto DistanceToMaxScore =
FVector::Distance(MaxScoreSelectable->GetOwner()->GetActorLocation(), GetComponentLocation());
auto Dist = TNumericLimits<float>::Max();
for (const auto Actor : CandidateList)
for (const TPair<UIntenSelectable*, FHitResult>& Actor : CandidateList)
{
const auto DistanceToCandidate = FVector::Distance(Actor.Value.ImpactPoint, GetComponentLocation());
if (DistanceToCandidate < Dist)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment