18 virtual void Tick(
float DeltaTime)
override;
20 virtual void SetupPlayerInputComponent(
class UInputComponent* PlayerInputComponent)
override;
23 virtual void SetupComponents(AController* ControllerReference =
nullptr, AActor* HUDReference =
nullptr,
const bool bIsLocallyControlled =
false)
override;
24 virtual void OnPawnSpawned()
override;
27 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
28 void UseAction(
const bool bValue);
29 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
30 void GrabAction(
const bool bValue)
const;
31 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
32 void ShootAction(
const bool bValue);
33 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
34 void ReloadAction(
const bool bValue)
const;
35 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
36 void AutoModeAction(
const bool bValue)
const;
37 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
38 void ThrowAction(
const bool bValue)
const;
39 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
40 void SwapWeaponAction(
const bool bValue)
const;
41 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
42 void HolsterAction(
const bool bValue)
const;
43 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
44 void MeleeAction(
const bool bValue)
const;
45 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
46 void QuickSaveAction(
const bool bValue);
47 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
48 void QuickLoadAction(
const bool bValue);
49 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
50 void PingAction(
const bool bValue)
const;
51 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
52 void PingMenuAction()
const;
57 UFUNCTION(BlueprintCallable, Category =
"Player|Input")
58 void SelectionUpAction(
const bool bValue)
const;
60 virtual void AimAction(
const bool bValue)
override;
64 virtual void HitMarker(
const AActor* ActorHit,
const float Damage,
const UDamageType* DamageType,
const FName HitBone,
const FVector HitLocation,
const bool bKillingHit =
false,
const bool bInjuredPart =
false)
override;
67 UFUNCTION(
Client, Reliable, Category=
"Hit Markers")
68 virtual
void Client_HitMarker(const AActor* ActorHit, const
float Damage, const UDamageType* DamageType, const FName HitBone, const FVector HitLocation, const
bool bKillingHit = false, const
bool bInjuredPart = false);
71 virtual
void StartThreatIndication(AActor* PawnThreat) override;
72 virtual
void UpdateThreatIndication(const FVector&
Location, const
float DetectionAmount) override;
73 virtual
void StopThreatIndication() override;
78 virtual
void OnCapsuleBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep, const FHitResult& SweepResult);
80 virtual
void OnCapsuleEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
85 virtual
void InteractionTraceEventHit(const FHitResult& HitResult);
88 virtual
void CameraUpAction_Implementation(
float Value) override;
89 virtual
void CameraRightAction_Implementation(
float Value) override;
90 virtual
EALSGait GetAllowedGait() const override;
92 virtual FVector GetAimDownSightCameraTarget() const override;
93 virtual
float GetAimDownSightFOV() const override;
94 virtual
bool GetCanAimDownSights() const override;
96 void CameraInputStopped();
100 virtual
void SlideStart();
101 virtual
void SlideStop();
103 void CalculateFloorInfluence();
105 UFUNCTION(BlueprintPure, BlueprintCallable, Category="
Custom ALS|Slide")
106 float GetSlideTime()
const {
return SlideTime;};
109 bool bMovingAxis =
false;
110 float CurrentCameraUp = 0.0f;
111 float CurrentCameraRight = 0.0f;
115 UFUNCTION(Exec, BlueprintCallable, Category=
"Debugging")
116 void SetDebugging(const FString& Component = "", const
bool bOn = true);
121 UFUNCTION(
Server, Reliable)
122 void ServerSetFiring(const
bool bFiring);
123 UFUNCTION(NetMulticast, Reliable)
124 void Multicast_SetFiring(const
bool bFiring);
128 UPROPERTY(Replicated, VisibleAnywhere, BlueprintReadOnly, Category= "Shooting")
129 bool bFiringWeapon = false;
131 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Shooting")
132 float FiringWeaponAimDownDelay = 5.0f;
133 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Shooting")
134 bool bUseGunAimDownSight = true;
138 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "Aim Assist")
140 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Aim Assist")
141 AActor* CurrentAimAssistTarget =
nullptr;
142 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Aim Assist")
143 int32 CurrentAimAssistTargetHits = 0;
144 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|Grabber")
145 float GrabberThrowMultiplier = 2.0f;
146 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category= "
Custom ALS|
Sliding")
147 float SlideTime = 2.0f;
152 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Shooting")
153 class UPlayerCharacterShootingComponent* PlayerShootingComponent;
159 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Companion")
160 class UCompanionMasterComponent* CompanionMasterComponent;
161 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Grabber")
162 class UCharacterGrabberComponent* GrabberComponent;
163 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category= "Grabber")
164 class UPhysicsHandleComponent* PhysicsHandleComponent;
173 virtual
void BeginPlay() override;
176 virtual
void SaveGameData() override;
177 virtual
void LoadGameData() override;
179 virtual
bool SaveCharacterData() override;
180 virtual
bool LoadCharacterData() override;
183 virtual
void LoadComponentsSaveData() override;
184 virtual
void SaveComponentsData() override;
187 virtual
void OnRotationModeChanged(
EALSRotationMode PreviousRotationMode) override;
188 virtual
bool CanJumpInternal_Implementation() const override;
189 virtual
bool CanCrouch() const override;
192 virtual
void StanceAction() override;
195 virtual
void FirePressedAction() override;
197 virtual
void InteractionDataUpdated() const override;
202 virtual int32 PickupGunEvent(const
FWeaponData_T In_WeaponData) override;
203 virtual
bool PickupGunCheck(const
FWeaponData_T& In_WeaponData) override;
204 virtual
bool PickupAttachmentCheck(const
FWeaponAttachment& In_WeaponAttachmentData) override;
205 virtual
void PickupAttachmentEvent(const FString& WeaponAttachmentID) override;
209 virtual
void WeaponEquipped(const TArray<
FWeaponData_T>& Weapons, const int32 CurrentWeaponIndex) override;
214 virtual
void OnFullDamageHit(AController* InstigatedBy, const
float TotalDamage, const UDamageType* DamageType, const FName& HitBone, const FVector& HitLocation, const
bool bKillingHit, const
bool bInjuredPart) override;
215 virtual
void OnDeath(AActor* OwningActor, const
EDeathType DeathType, AActor* DeathCauser, AController* DeathInstigator) override;
218 void TakeAnyDamage(AActor* DamagedActor,
float Damage, const UDamageType* DamageType, AController* InstigatedBy, AActor* DamageCauser);
226 virtual
void UpdateStaminaHUD() override;
228 UFUNCTION(BlueprintImplementableEvent)
229 void OnStealthTakedown(const AActor* Victim, const
bool bLethal = true);
231 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
233 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
234 bool bStealthAttachToCustomMesh = true;
235 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
236 bool bStealthAttachToCapsule = false;
237 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
238 bool bStealthAttachToCharacterMesh = false;
240 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
241 bool bStealthWeldBodies = false;
242 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
243 EAttachmentRule StealthLocationRule = EAttachmentRule::KeepWorld;
244 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
245 EAttachmentRule StealthRotationRule = EAttachmentRule::KeepWorld;
255 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
256 bool bStealthAttach = false;
259 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category= "
Stealth")
260 TArray<UAnimMontage*> StealthTakedownAnims;
265 AActor* StealthActor =
nullptr;
268 bool bStealthTakedownAvailable = false;
269 bool bPerformingStealthTakedown = false;
271 FTimerHandle StealthTakedownTimerHandle;
274 void StealthTakedown(const
bool bLethal = true);
276 void StealthTakedownComplete();
277 void StealthKnockoutComplete();
280 void FiringWeaponAimDown();
283 FTimerHandle FiringWeaponTimerHandle;
284 FTimerHandle CompanionContextTimerHandle;
285 FTimerHandle SlideTimerHandle;