Merge remote-tracking branch 'origin/dev' into WeaponSystem
# Conflicts: # EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
This commit is contained in:
commit
29b436434b
BIN
EndlessVendetta/Content/AI/Enemy/Basic/BB_BasicEnemy.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/AI/Enemy/Basic/BB_BasicEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/AI/Enemy/Basic/BT_BasicEnemy.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/AI/Enemy/Basic/BT_BasicEnemy.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/Gadgets/BP_Grenade.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Gadgets/BP_Grenade.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:69dcd1314353f09d4f12cc1a2a2ced8540f035585740d097a179bb332d850779
|
||||
size 4545
|
@ -3,12 +3,14 @@
|
||||
|
||||
#include "AICharacter.h"
|
||||
|
||||
#include "AI_CompanionController.h"
|
||||
#include "AI_EnemyController.h"
|
||||
#include "Components/CapsuleComponent.h"
|
||||
#include "Engine/DamageEvents.h"
|
||||
#include "GameFramework/CharacterMovementComponent.h"
|
||||
#include "Perception/AIPerceptionStimuliSourceComponent.h"
|
||||
#include "Perception/AISense_Sight.h"
|
||||
#include "BehaviorTree/BlackboardComponent.h"
|
||||
#include "Blueprint/AIBlueprintHelperLibrary.h"
|
||||
|
||||
|
||||
// Sets default values
|
||||
@ -48,12 +50,13 @@ float AAICharacter::TakeDamage(const float DamageAmount, FDamageEvent const& Dam
|
||||
CurrentHealth -= DamageAmount;
|
||||
if (CurrentHealth <= 0)
|
||||
{
|
||||
if (!IsValid(this)) return 0.0f;
|
||||
CurrentHealth = 0;
|
||||
UE_LOG(LogTemp, Display, TEXT("%s is dead"), *CharacterName.ToString());
|
||||
|
||||
const AAI_CompanionController* AIController = Cast<AAI_CompanionController>(GetController());
|
||||
AIController->GetBrainComponent()->StopLogic(*CharacterName.ToString() + FString(" is dead"));
|
||||
|
||||
/*const AAI_EnemyController* AIController = Cast<AAI_EnemyController>(GetController());
|
||||
AIController->GetBrainComponent()->StopLogic(" is dead");*/
|
||||
this->Tags.Add(FName("Dead"));
|
||||
//Ragdoll
|
||||
DetachFromControllerPendingDestroy();
|
||||
UCapsuleComponent* CapsuleComp = GetCapsuleComponent();
|
||||
|
@ -36,6 +36,14 @@ void AAI_EnemyController::OnPossess(APawn* InPawn)
|
||||
UBlackboardComponent* TempBlackboardPtr;
|
||||
UseBlackboard(BehaviorTree->BlackboardAsset, TempBlackboardPtr);
|
||||
Blackboard = TempBlackboardPtr;
|
||||
if (IsValid(EnemyCharacter->GetPatrolPath()))
|
||||
{
|
||||
Blackboard->SetValueAsBool("IsPatroling", true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Blackboard->SetValueAsBool("IsPatroling", false);
|
||||
}
|
||||
RunBehaviorTree(BehaviorTree);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include "CollisionDebugDrawingPublic.h"
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "Engine/DamageEvents.h"
|
||||
#include "EndlessVendetta/AI/AICharacter.h"
|
||||
|
||||
// Sets default values
|
||||
AExplosive::AExplosive()
|
||||
@ -69,6 +71,7 @@ void AExplosive::Explosion()
|
||||
}
|
||||
// When merged, call philips take damage function here
|
||||
UE_LOG(LogTemp, Warning, TEXT("A shrapnel piece hit %s, dealing %f damage"), *OutHit.GetActor()->GetName(), DamageToApply);
|
||||
Cast<AAICharacter>(OutHit.GetActor())->TakeDamage(DamageToApply, FPointDamageEvent(), GetWorld()->GetFirstPlayerController(), this);
|
||||
}
|
||||
}
|
||||
PlayExplosionEffects();
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "Components/CapsuleComponent.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Engine/DamageEvents.h"
|
||||
#include "EndlessVendetta/AI/EnemyCharacter.h"
|
||||
|
||||
|
||||
// Sets default values
|
||||
@ -95,16 +97,6 @@ void ABaseWeaponClass::ApplyRecoil(float DeltaTime)
|
||||
}
|
||||
|
||||
|
||||
//void ABaseWeaponClass::RecoilVerticalLimit(FHitResult Outhit)
|
||||
//{
|
||||
// double currentCameraRot = playerInWorld->GetControlRotation().Pitch;
|
||||
// if (bulletCountShoot >= 3)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
void ABaseWeaponClass::nullSamples()
|
||||
{
|
||||
recoilCurvet = 0;
|
||||
@ -177,7 +169,7 @@ void ABaseWeaponClass::Fire()
|
||||
bulletCountShoot += 1;
|
||||
if (outHit.bBlockingHit)
|
||||
{
|
||||
//UE_LOG(LogTemp, Display, TEXT("hit item: %s"), *outHit.GetActor()->GetName());
|
||||
Cast<AAICharacter>(outHit.GetActor())->TakeDamage(WeaponDamage, FPointDamageEvent(), GetWorld()->GetFirstPlayerController(), this);
|
||||
}
|
||||
}
|
||||
else if(currentAmmoCount <= 0)
|
||||
|
Loading…
Reference in New Issue
Block a user