Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organized Map Folder #92

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Content/Unbread/Maps/AudioTest.umap
Git LFS file not shown
3 changes: 0 additions & 3 deletions Content/Unbread/Maps/BlockoutLevelTest.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/CharacterMeshTesting.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/CharacterTestMaps/CharacterTest02.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/DeathTesting.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/DynamicCameraTest01.umap

This file was deleted.

4 changes: 2 additions & 2 deletions Content/Unbread/Maps/HazardsTest01.umap
Git LFS file not shown
3 changes: 0 additions & 3 deletions Content/Unbread/Maps/Level2Test1.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/ModelTestLevel.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/ObjectiveMaterial.uasset

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/ObjectiveMaterial2.uasset

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/PuzzleMechanicTesting.umap

This file was deleted.

3 changes: 0 additions & 3 deletions Content/Unbread/Maps/RangedAI.umap

This file was deleted.

3 changes: 3 additions & 0 deletions Content/Unbread/Maps/Testing_Maps/AudioTest.umap
Git LFS file not shown
3 changes: 3 additions & 0 deletions Content/Unbread/Maps/Testing_Maps/BlockoutLevelTest.umap
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions Content/Unbread/Maps/Testing_Maps/HazardsTest01.umap
Git LFS file not shown
3 changes: 3 additions & 0 deletions Content/Unbread/Maps/Testing_Maps/RangedAI.umap
Git LFS file not shown
23 changes: 11 additions & 12 deletions Source/unbread/Private/SRangedAICharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ FHitResult ASRangedAICharacter::CapsuleTrace()
{
FHitResult OutHit;
TArray<AActor*> ActorsToIgnore;

TArray<AActor*> IgnoredActors;
ActorsToIgnore.AddUnique(this);

FVector EyesLoc;
FRotator EyesRot;
GetController()->GetPlayerViewPoint(EyesLoc, EyesRot);
Expand All @@ -64,13 +64,13 @@ void ASRangedAICharacter::StartWaponFire()

ToggleADS(true);
AnimValues.bIsShooting = true;

FVector launchLocation = GetActorLocation() + GetActorForwardVector() * 120.0f;

ASProjectile* pr = GetWorld()->SpawnActor<ASProjectile>(Projectile, launchLocation, GetActorRotation());
pr->SetInstigator(this);
pr->SetActorScale3D({0.5f, 0.5f, 0.5f});

if(FireHandle.IsValid())
{
return;
Expand Down Expand Up @@ -98,16 +98,15 @@ void ASRangedAICharacter::BeginPlay()

float ASRangedAICharacter::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser)
{

const float DamageApplied = Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser);

const ASRangedAICharacter* chr = Cast<ASRangedAICharacter>(DamageCauser->GetInstigator());
if(chr && (chr == this || chr->faction == faction))

if(chr && (chr == this || chr->faction == faction))
{
return 0.0f;
}

Health -= DamageApplied;

if(ControllerRef)
Expand Down Expand Up @@ -149,7 +148,7 @@ bool ASRangedAICharacter::CanBeSeenFrom(const FVector& ObserverLocation, FVector
int32* UserData) const
{
static const FName NAME_AILineOfSight = FName(TEXT("TestPawnLineOfSight"));

FHitResult HitResult;
FVector SocketLocaiton = GetMesh()->GetSocketLocation(PerceptionTarget);

Expand All @@ -172,7 +171,7 @@ bool ASRangedAICharacter::CanBeSeenFrom(const FVector& ObserverLocation, FVector
FCollisionQueryParams(NAME_AILineOfSight, true, IgnoreActor));

NumberOfLoSChecksPerformed++;

if(bHitSocket == false || (HitResult.GetActor()->IsOwnedBy(this)))
{
OutSeenLocation = GetActorLocation();
Expand All @@ -181,7 +180,7 @@ bool ASRangedAICharacter::CanBeSeenFrom(const FVector& ObserverLocation, FVector
return true;
}
OutSightStrength = 0;

return false;
}

Expand Down
Loading