diff --git a/EndlessVendetta/Source/EndlessVendetta/AI/EnemyCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/AI/EnemyCharacter.cpp index 1e779bdc..96455cc1 100644 --- a/EndlessVendetta/Source/EndlessVendetta/AI/EnemyCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/AI/EnemyCharacter.cpp @@ -60,10 +60,9 @@ void AEnemyCharacter::SetAlertLevel(const int NewAlertLevel) const void AEnemyCharacter::SetLocalAlertLevel(int NewAlertLevel) { if (!IsValid(GetController())) return; - Cast(GetController())->GetBlackboardComponent()->SetValueAsBool("IsInvestigating", true); + if (NewAlertLevel == Cast(GetController())->GetBlackboardComponent()->GetValueAsInt("AlertLevel")) return; + SetAlertLevel(NewAlertLevel); if (NewAlertLevel >= 2) SetHostilityLevel(EHostilityLevel::Hostile); - if (!IsValid(DelegatedControlHub)) return; - DelegatedControlHub->SetAlertLevel(NewAlertLevel); } void AEnemyCharacter::SetHostilityLevel(const EHostilityLevel NewHostilityLevel)