Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.
Open
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
1 change: 0 additions & 1 deletion Source/Navgrid/NavGrid.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public class NavGrid : ModuleRules
{
public NavGrid(ReadOnlyTargetRules TargetRules) : base(TargetRules) {
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AIModule" });
PrivatePCHHeaderFile = "Private/NavGridPrivatePCH.h";

if (TargetRules.bBuildEditor)
{
Expand Down
3 changes: 2 additions & 1 deletion Source/Navgrid/Private/ExampleGridPawn.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "ExampleGridPawn.h"

#include "Engine.h"
#include "Components/StaticMeshComponent.h"
#include "Components/ArrowComponent.h"
#include "Components/CapsuleComponent.h"

AExampleGridPawn::AExampleGridPawn()
:Super()
Expand Down
6 changes: 5 additions & 1 deletion Source/Navgrid/Private/GridMovementComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "GridMovementComponent.h"

#include "NavGrid.h"
#include "NavGridGameState.h"
#include "NavLadderComponent.h"
#include "TurnComponent.h"
#include "Components/SplineComponent.h"
#include "Components/SplineMeshComponent.h"
#include "Animation/AnimInstance.h"
Expand Down
3 changes: 2 additions & 1 deletion Source/Navgrid/Private/GridPawn.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "GridPawn.h"

#if WITH_EDITORONLY_DATA
#include "Editor.h"
#endif
Expand Down
15 changes: 12 additions & 3 deletions Source/Navgrid/Private/NavGrid.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "NavGrid.h"

#include "AssetRegistryModule.h"

#include <limits>
Expand Down Expand Up @@ -302,9 +303,17 @@ bool ANavGrid::TraceTileLocation(const FVector & TraceStart, const FVector & Tra

GetWorld()->LineTraceSingleByChannel(HitResult, TraceStart, TraceEnd, ECollisionChannel::ECC_Pawn, CQP);
bool bHasDisableTileTag = false;
if (HitResult.Actor.IsValid())

AActor* HitActor = nullptr;

if (HitResult.IsValidBlockingHit())
{
HitActor = HitResult.GetActor();
}

if (HitActor)
{
bHasDisableTileTag = HitResult.Actor->ActorHasTag(DisableVirtualTilesTag);
bHasDisableTileTag = HitActor->ActorHasTag(DisableVirtualTilesTag);
}

OutTilePos = HitResult.ImpactPoint;
Expand Down
3 changes: 2 additions & 1 deletion Source/Navgrid/Private/NavGridGameMode.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "NavGridGameMode.h"
#include "NavGridPC.h"

ANavGridGameMode::ANavGridGameMode()
:Super()
Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/NavGridGameState.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "NavGridGameState.h"

ANavGrid* ANavGridGameState::GetNavGrid()
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/NavGridPC.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "NavGridPC.h"

ANavGridPC::ANavGridPC(const FObjectInitializer& ObjectInitializer)
:Super(ObjectInitializer)
Expand Down
1 change: 0 additions & 1 deletion Source/Navgrid/Private/NavGridPlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "NavGridPrivatePCH.h"
#include "NavGridPlugin.h"


Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/NavGridPlugin.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "ModuleManager.h"
#include "Modules/ModuleManager.h"

class NavGridPluginImpl : public IModuleInterface
{
Expand Down
17 changes: 0 additions & 17 deletions Source/Navgrid/Private/NavGridPrivatePCH.h

This file was deleted.

2 changes: 1 addition & 1 deletion Source/Navgrid/Private/NavLadderActor.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "NavGridPrivatePCH.h"
#include "NavLadderActor.h"


ANavLadderActor::ANavLadderActor(const FObjectInitializer &ObjectInitializer)
: Super(ObjectInitializer)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/NavLadderComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "NavLadderComponent.h"

UNavLadderComponent::UNavLadderComponent()
:Super()
Expand Down
1 change: 0 additions & 1 deletion Source/Navgrid/Private/NavTileActor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "NavGridPrivatePCH.h"
#include "NavTileActor.h"

ANavTileActor::ANavTileActor(const FObjectInitializer &ObjectInitializer)
Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/NavTileComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "NavTileComponent.h"
#include <limits>
#include "Components/CapsuleComponent.h"
#include "DrawDebugHelpers.h"
Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/TurnComponent.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "NavGridPrivatePCH.h"
#include "TurnComponent.H"

UTurnComponent::UTurnComponent()
:Super(),
Expand Down
2 changes: 1 addition & 1 deletion Source/Navgrid/Private/TurnManager.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "NavGridPrivatePCH.h"
#include "TurnManager.h"

ATurnManager::ATurnManager() :
MinNumberOfTeams(1),
Expand Down