Bugfix Invalid AI Controller
This commit is contained in:
		
							parent
							
								
									9e868073f4
								
							
						
					
					
						commit
						52f8aeddb4
					
				| @ -77,8 +77,11 @@ void AAICharacter::SetupStimuliSourceComponent() | ||||
| void AAICharacter::OnDeath() | ||||
| { | ||||
| 	AAI_EnemyController* AIController = Cast<AAI_EnemyController>(GetController()); | ||||
| 	if (!IsValid(AIController)) return; | ||||
| 	UBlackboardComponent* Blackboard = AIController->GetBlackboardComponent(); | ||||
| 	if (!IsValid(Blackboard)) return; | ||||
| 	AEndlessVendettaCharacter* PlayerCharacter = Cast<AEndlessVendettaCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn()); | ||||
| 	if (!IsValid(PlayerCharacter)) return; | ||||
| 	if (Blackboard->GetValueAsBool("SeenWithHostilities")) | ||||
| 	{ | ||||
| 		PlayerCharacter->DecrementSeenHostileCount(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user