Update Enemy Character to Stop Setting Alert Level on Sense
This commit is contained in:
parent
e56c9d39b7
commit
e306ecf9a1
@ -60,10 +60,9 @@ void AEnemyCharacter::SetAlertLevel(const int NewAlertLevel) const
|
|||||||
void AEnemyCharacter::SetLocalAlertLevel(int NewAlertLevel)
|
void AEnemyCharacter::SetLocalAlertLevel(int NewAlertLevel)
|
||||||
{
|
{
|
||||||
if (!IsValid(GetController())) return;
|
if (!IsValid(GetController())) return;
|
||||||
Cast<AAIController>(GetController())->GetBlackboardComponent()->SetValueAsBool("IsInvestigating", true);
|
if (NewAlertLevel == Cast<AAIController>(GetController())->GetBlackboardComponent()->GetValueAsInt("AlertLevel")) return;
|
||||||
|
SetAlertLevel(NewAlertLevel);
|
||||||
if (NewAlertLevel >= 2) SetHostilityLevel(EHostilityLevel::Hostile);
|
if (NewAlertLevel >= 2) SetHostilityLevel(EHostilityLevel::Hostile);
|
||||||
if (!IsValid(DelegatedControlHub)) return;
|
|
||||||
DelegatedControlHub->SetAlertLevel(NewAlertLevel);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AEnemyCharacter::SetHostilityLevel(const EHostilityLevel NewHostilityLevel)
|
void AEnemyCharacter::SetHostilityLevel(const EHostilityLevel NewHostilityLevel)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user