Skip to content

Commit

Permalink
Starting our First Ability
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreDartStudios committed Jul 22, 2023
1 parent 9620c48 commit 402e872
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 0 deletions.
Binary file modified Content/AbilitySystem/Abilities/GA_TargetTestingAbility.uasset
Binary file not shown.
Binary file not shown.
Binary file modified Content/BP/Game/BP_PlayerController.uasset
Binary file not shown.
Binary file modified Content/BP/HUD/BP_HUD.uasset
Binary file not shown.
Binary file modified Content/BP/HUD/FloatingCriticalDamageSpeed.uasset
Binary file not shown.
Binary file modified Content/BP/HUD/FloatingDamageSpeed.uasset
Binary file not shown.
Binary file modified Content/Maps/HubWorldMap.umap
Binary file not shown.
41 changes: 41 additions & 0 deletions Source/OWSHubWorldMMO/Private/AbilitySystem/HWFakeProjectile.cpp
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 Source/OWSHubWorldMMO/Public/AbilitySystem/HWFakeProjectile.h
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;
};

0 comments on commit 402e872

Please sign in to comment.