DRG-Femboy-Voice/Source/FSD/Public/ProjectileBase.h
2025-04-15 12:39:31 -07:00

168 lines
5.8 KiB
C++
Executable file

#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "GameFramework/Actor.h"
#include "Engine/EngineTypes.h"
#include "Engine/NetSerialization.h"
#include "Engine/NetSerialization.h"
#include "EOnProjectileImpactBehaviourEnum.h"
#include "ProjectileImpact.h"
#include "ProjectileBase.generated.h"
class AProjectileBase;
class UDamageComponent;
class UFSDPhysicalMaterial;
class UItemUpgrade;
class UPrimitiveComponent;
class UProjectileUpgradeElement;
class USoundCue;
class USphereComponent;
class UTerrainMaterial;
UCLASS(Abstract, Blueprintable)
class AProjectileBase : public AActor {
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_ProjectileImpact, meta=(AllowPrivateAccess=true))
FProjectileImpact ProjectileImpact;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, Transient, meta=(AllowPrivateAccess=true))
bool IsSpawnedFromWeapon;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool Exploded;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool DoOnImpact;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool DoOnImpact2;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool DoOnImpact3;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true))
bool DoOnSpawnVar;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float GravityMultiplier;
protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_IsDorment, meta=(AllowPrivateAccess=true))
bool IsDorment;
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
USphereComponent* CollisionComponent;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float LifeSpan;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float VelocityMultiplier;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool AffectedByDifficultySpeedModifier;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool SetInitialSpeedToMaxSpeed;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool AutoDisableCollisionOnImpact;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
USoundCue* WhizbySound;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float WhizByCooldown;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
float WhizByStartDistance;
UPROPERTY(EditAnywhere, meta=(AllowPrivateAccess=true))
EOnProjectileImpactBehaviourEnum EOnImpactBehaviour;
public:
AProjectileBase();
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
UFUNCTION(BlueprintCallable, BlueprintPure)
UTerrainMaterial* TryGetTerrainMaterial() const;
UFUNCTION(BlueprintCallable)
void StopMovement();
protected:
UFUNCTION(BlueprintCallable, Reliable, Server)
void Server_SetState(FVector_NetQuantize Position, FVector_NetQuantize Velocity);
UFUNCTION(BlueprintCallable, Reliable, Server)
void Server_Penetrated(const FProjectileImpact& Impact);
UFUNCTION(BlueprintCallable, Reliable, Server)
void Server_Impacted(const FProjectileImpact& Impact);
public:
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void OnUpgradeElementAdded(UProjectileUpgradeElement* element);
UFUNCTION(BlueprintCallable)
void OnRep_ProjectileImpact();
UFUNCTION(BlueprintCallable)
void OnRep_IsDorment(const bool wasDorment);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void OnPenetrated(bool PredictedPenetration, const FHitResult& HitResult);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void OnInitialized();
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void OnImpacted(bool PredictedImpact, const FHitResult& HitResult);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void MakeBouncy();
UFUNCTION(BlueprintCallable)
void InitState(const FVector& ShootDirection, const FVector& initialBonusVelocity);
UFUNCTION(BlueprintCallable)
void InitComponents();
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable)
void IgnoreCollision(UPrimitiveComponent* otherCollider);
UFUNCTION(BlueprintCallable, BlueprintPure)
bool HasImpactAuthority() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
float GetGameTimeSinceActivation() const;
UFUNCTION(BlueprintCallable, BlueprintPure)
int32 GetBoneIndex() const;
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void DoOnSpawn();
UFUNCTION(BlueprintCallable)
static void DisableProjectileCollision(AProjectileBase* projectileA, AProjectileBase* projectileB);
UFUNCTION(BlueprintCallable)
void DisableAndDestroy();
protected:
UFUNCTION(BlueprintCallable)
UFSDPhysicalMaterial* DamageArmor(UDamageComponent* DamageComponent, const FHitResult& HitResult);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
void CustomEvent(const UItemUpgrade* Event);
UFUNCTION(BlueprintCallable, Client, Reliable)
void Client_DrawServersDebugPath(FVector Location);
public:
UFUNCTION(BlueprintCallable)
void Activate(AActor* owningActor, FVector Origin, FVector_NetQuantizeNormal Direction, FVector_NetQuantizeNormal initialBonusVelocity);
};