-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9620c48
commit 402e872
Showing
9 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
Binary file modified
BIN
+43.4 KB
(160%)
Content/AbilitySystem/Abilities/GA_TargetTestingAbility.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
41 changes: 41 additions & 0 deletions
41
Source/OWSHubWorldMMO/Private/AbilitySystem/HWFakeProjectile.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright 2023 Sabre Dart Studios | ||
|
||
|
||
#include "AbilitySystem/HWFakeProjectile.h" | ||
#include "Engine/EngineTypes.h" | ||
#include "../OWSHubWorldMMO.h" | ||
|
||
|
||
// Sets default values | ||
AHWFakeProjectile::AHWFakeProjectile() | ||
{ | ||
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. | ||
PrimaryActorTick.bCanEverTick = true; | ||
bReplicates = true; | ||
SetReplicatingMovement(false); | ||
bNetUseOwnerRelevancy = true; | ||
bOnlyRelevantToOwner = false; | ||
|
||
ProjectileMovement = CreateDefaultSubobject<UProjectileMovementComponent>(TEXT("ProjectileMovement")); | ||
|
||
UE_LOG(OWSHubWorldMMO, VeryVerbose, TEXT("AHWFakeProjectile - Constructor")); | ||
} | ||
|
||
// Called when the game starts or when spawned | ||
void AHWFakeProjectile::BeginPlay() | ||
{ | ||
Super::BeginPlay(); | ||
|
||
} | ||
|
||
// Called every frame | ||
void AHWFakeProjectile::Tick(float DeltaTime) | ||
{ | ||
Super::Tick(DeltaTime); | ||
|
||
} | ||
|
||
bool AHWFakeProjectile::IsNetRelevantFor(const AActor* RealViewer, const AActor* ViewTarget, const FVector& SrcLocation) const | ||
{ | ||
return !IsOwnedBy(ViewTarget); | ||
} |
31 changes: 31 additions & 0 deletions
31
Source/OWSHubWorldMMO/Public/AbilitySystem/HWFakeProjectile.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2023 Sabre Dart Studios | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "GameFramework/Actor.h" | ||
#include "GameFramework/ProjectileMovementComponent.h" | ||
#include "HWFakeProjectile.generated.h" | ||
|
||
UCLASS() | ||
class OWSHUBWORLDMMO_API AHWFakeProjectile : public AActor | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
// Sets default values for this actor's properties | ||
AHWFakeProjectile(); | ||
|
||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Projectile") | ||
UProjectileMovementComponent* ProjectileMovement; | ||
|
||
protected: | ||
// Called when the game starts or when spawned | ||
virtual void BeginPlay() override; | ||
|
||
public: | ||
// Called every frame | ||
virtual void Tick(float DeltaTime) override; | ||
|
||
virtual bool IsNetRelevantFor(const AActor* RealViewer, const AActor* ViewTarget, const FVector& SrcLocation) const override; | ||
}; |