From 12323d425bc4cf819e6367417c9bd527ff82e89d Mon Sep 17 00:00:00 2001 From: Maxime Date: Fri, 13 Oct 2023 00:16:16 +0200 Subject: [PATCH] Clean code --- Pawn_Unreal/Content/Characters/BP_Judy.uasset | 4 ++-- Pawn_Unreal/Content/Core/GM_MainGameMode.uasset | 4 ++-- Pawn_Unreal/Content/Input/BP_MainPlayerController.uasset | 4 ++-- Pawn_Unreal/Content/Maps/Dev/MAP_ControllerGym.umap | 4 ++-- .../MAP_ControllerGym/3/JJ/2G4XZ4FX8KSV5ISWLBUX9T.uasset | 3 +++ .../MAP_ControllerGym/3/S1/Q0FDQMTTCM0M6RLWXOTPMF.uasset | 4 ++-- .../MAP_ControllerGym/D/11/8KRHTI8SRC72YR9XJOITVN.uasset | 4 ++-- .../Source/Pawn/Private/Interaction/PwnTriggerRegister.cpp | 7 +++---- .../Pawn/Public/GameplayModes/PwnGameplayModeLibrary.h | 2 +- .../Source/Pawn/Public/Interaction/PwnInteractable.h | 2 +- Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTrigger.h | 2 +- .../Source/Pawn/Public/Interaction/PwnTriggerRegister.h | 2 +- 12 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/JJ/2G4XZ4FX8KSV5ISWLBUX9T.uasset diff --git a/Pawn_Unreal/Content/Characters/BP_Judy.uasset b/Pawn_Unreal/Content/Characters/BP_Judy.uasset index 572f19c..d66d38e 100644 --- a/Pawn_Unreal/Content/Characters/BP_Judy.uasset +++ b/Pawn_Unreal/Content/Characters/BP_Judy.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f8c5ad6bed973bf3664fff6e6fae64d4f38e767908675cf195503b2ed04f3f0 -size 195534 +oid sha256:b687f5c5ffdb9bea6a9ace5990a3295fcba526ab6e2d441fb260aba6e7dc8bfb +size 166500 diff --git a/Pawn_Unreal/Content/Core/GM_MainGameMode.uasset b/Pawn_Unreal/Content/Core/GM_MainGameMode.uasset index 4bdc165..bdc08f0 100644 --- a/Pawn_Unreal/Content/Core/GM_MainGameMode.uasset +++ b/Pawn_Unreal/Content/Core/GM_MainGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbd5c4177dc9d308fc8c9d6001907b1cf837bb757695a46b7592ced83df41ae9 -size 104584 +oid sha256:7e1a114b0a7270d4c3639fb0c27cec773f8899f91b6d6bd2ccc5f90b9c3cd2c6 +size 138847 diff --git a/Pawn_Unreal/Content/Input/BP_MainPlayerController.uasset b/Pawn_Unreal/Content/Input/BP_MainPlayerController.uasset index c961290..9ab9aba 100644 --- a/Pawn_Unreal/Content/Input/BP_MainPlayerController.uasset +++ b/Pawn_Unreal/Content/Input/BP_MainPlayerController.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dfbdf3b1f82aae030c65c8cbfa736f41015da589eba38618eaa31f4da3d9447 -size 203009 +oid sha256:1dc6a5aad020ef72c39302a38d70252d244d4b7bd6715d0e4350d9a8aceb256c +size 376658 diff --git a/Pawn_Unreal/Content/Maps/Dev/MAP_ControllerGym.umap b/Pawn_Unreal/Content/Maps/Dev/MAP_ControllerGym.umap index 70f7ea2..d5ed56c 100644 --- a/Pawn_Unreal/Content/Maps/Dev/MAP_ControllerGym.umap +++ b/Pawn_Unreal/Content/Maps/Dev/MAP_ControllerGym.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68a5e337fd026d21fd1132dd989e91fdfcd6ed544f3665a9253426e6cf65d489 -size 169622 +oid sha256:cf8faa684a75e3f6952436d2002faadcdc22024d0bbbc2fda66745751b7e6957 +size 177294 diff --git a/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/JJ/2G4XZ4FX8KSV5ISWLBUX9T.uasset b/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/JJ/2G4XZ4FX8KSV5ISWLBUX9T.uasset new file mode 100644 index 0000000..5c4e414 --- /dev/null +++ b/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/JJ/2G4XZ4FX8KSV5ISWLBUX9T.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3aff86262fe85052ddc2e40e53181738c8f2597e857c42a18f2c4a5b809dd54a +size 7228 diff --git a/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/S1/Q0FDQMTTCM0M6RLWXOTPMF.uasset b/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/S1/Q0FDQMTTCM0M6RLWXOTPMF.uasset index 14c6bee..8f7ee9b 100644 --- a/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/S1/Q0FDQMTTCM0M6RLWXOTPMF.uasset +++ b/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/3/S1/Q0FDQMTTCM0M6RLWXOTPMF.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81cede3d878f92f777511823e62f7773a400d2fad1a23601eba6c58a3a220c43 -size 4327 +oid sha256:18dce8ce6bda74815912bd1a7b7f18470fe3713cc6818760ba67ff11d1d030ee +size 4441 diff --git a/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/D/11/8KRHTI8SRC72YR9XJOITVN.uasset b/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/D/11/8KRHTI8SRC72YR9XJOITVN.uasset index 1f06fc7..8920c19 100644 --- a/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/D/11/8KRHTI8SRC72YR9XJOITVN.uasset +++ b/Pawn_Unreal/Content/__ExternalActors__/Maps/Dev/MAP_ControllerGym/D/11/8KRHTI8SRC72YR9XJOITVN.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed2db25e1072a190d79dd23a8c1348589d0e210061b86516f2ce873f1d447f39 -size 7172 +oid sha256:fbc85907d1101163944ce43bbf64647ad3981f2af7c5f6f618912981b33e89c6 +size 46429 diff --git a/Pawn_Unreal/Source/Pawn/Private/Interaction/PwnTriggerRegister.cpp b/Pawn_Unreal/Source/Pawn/Private/Interaction/PwnTriggerRegister.cpp index c5cb097..d2f5af2 100644 --- a/Pawn_Unreal/Source/Pawn/Private/Interaction/PwnTriggerRegister.cpp +++ b/Pawn_Unreal/Source/Pawn/Private/Interaction/PwnTriggerRegister.cpp @@ -26,7 +26,7 @@ void UPwnTriggerRegister::UnregisterTrigger(UPwnTrigger* Trigger) { RelevantTrigger = nullptr; } } -UE_DISABLE_OPTIMIZATION + void UPwnTriggerRegister::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) { UPwnTrigger* BestTrigger = nullptr; @@ -34,9 +34,9 @@ void UPwnTriggerRegister::TickComponent(float DeltaTime, ELevelTick TickType, for (UPwnTrigger* PwnTrigger : Triggers) { FVector2D ActorForward = FVector2D(GetOwner()->GetActorForwardVector()); FVector2D ActorToTrigger = FVector2D(PwnTrigger->GetVolumeCenter() - GetOwner()->GetActorLocation()).GetSafeNormal(); - const float Dot = FVector2D::DotProduct(ActorForward, ActorToTrigger); - // Check dot product against lowest dot product and check if the actor is facing the trigger + // Check dot product against lowest dot product and check if the actor is facing the trigger + const float Dot = FVector2D::DotProduct(ActorForward, ActorToTrigger); if (Dot < LowestDot && (!PwnTrigger->MustFaceCenter || FMath::RadiansToDegrees(FMath::Acos(Dot)) < PwnTrigger->FaceAngle * 0.5f)) { LowestDot = Dot; BestTrigger = PwnTrigger; @@ -54,4 +54,3 @@ void UPwnTriggerRegister::TickComponent(float DeltaTime, ELevelTick TickType, } } } -UE_ENABLE_OPTIMIZATION \ No newline at end of file diff --git a/Pawn_Unreal/Source/Pawn/Public/GameplayModes/PwnGameplayModeLibrary.h b/Pawn_Unreal/Source/Pawn/Public/GameplayModes/PwnGameplayModeLibrary.h index b547791..7bab252 100644 --- a/Pawn_Unreal/Source/Pawn/Public/GameplayModes/PwnGameplayModeLibrary.h +++ b/Pawn_Unreal/Source/Pawn/Public/GameplayModes/PwnGameplayModeLibrary.h @@ -4,7 +4,7 @@ #include "Kismet/BlueprintFunctionLibrary.h" #include "PwnGameplayModeLibrary.generated.h" -UCLASS(DisplayName="Gameplay Mode Library") +UCLASS() class PAWN_API UPwnGameplayModeLibrary : public UBlueprintFunctionLibrary { GENERATED_BODY() diff --git a/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnInteractable.h b/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnInteractable.h index 080c21c..3022f76 100644 --- a/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnInteractable.h +++ b/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnInteractable.h @@ -11,7 +11,7 @@ enum EInteractionType { Disable, }; -UINTERFACE(BlueprintType, Blueprintable, DisplayName="Interactable") +UINTERFACE(BlueprintType, Blueprintable) class PAWN_API UPwnInteractable : public UInterface { GENERATED_BODY() }; diff --git a/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTrigger.h b/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTrigger.h index cbbdf30..a21475a 100644 --- a/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTrigger.h +++ b/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTrigger.h @@ -35,7 +35,7 @@ struct FInteractableActions { UCLASS(ClassGroup="Interaction", HideCategories=("Cooking", "Replication", "Collision"), - meta=(BlueprintSpawnableComponent, DisplayName="Trigger")) + meta=(BlueprintSpawnableComponent)) class PAWN_API UPwnTrigger : public UActorComponent, public IPwnInteractable { GENERATED_BODY() diff --git a/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTriggerRegister.h b/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTriggerRegister.h index 6d7372e..10c521e 100644 --- a/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTriggerRegister.h +++ b/Pawn_Unreal/Source/Pawn/Public/Interaction/PwnTriggerRegister.h @@ -10,7 +10,7 @@ class UPwnTrigger; UCLASS(ClassGroup="Interaction", HideCategories=("Activation", "Cooking", "Replication", "Collision"), - meta=(BlueprintSpawnableComponent, DisplayName="Trigger Register")) + meta=(BlueprintSpawnableComponent)) class PAWN_API UPwnTriggerRegister : public UActorComponent { GENERATED_BODY()