From c25cbe597700a7a7dcfd8ef85f7d9fa2e4a95469 Mon Sep 17 00:00:00 2001 From: Rafal Swierczek Date: Fri, 12 Jan 2024 16:18:40 +0000 Subject: [PATCH] Implemented Vaulting Fix without Animations --- .../.idea/indexLayout.xml | 8 +++ .../.idea/projectSettingsUpdater.xml | 6 ++ .../.idea/.idea.EndlessVendetta/.idea/vcs.xml | 6 ++ .../.idea.EndlessVendetta/.idea/workspace.xml | 68 ++++++++----------- .../Content/BountySystem/testintesting.uasset | 3 + .../Blueprints/BP_FirstPersonCharacter.uasset | 4 +- .../BaseWeapons/BP_BaseWeapon.uasset | 4 +- .../Animations/NewFirstPerson_AnimBP.uasset | 4 +- .../Content/Levels/TrainingFacility.umap | 4 +- .../Architecture/Floor_400x400.uasset | 2 +- .../Content/Anims/FirstPerson_AnimBP.uasset | 4 +- .../Blueprints/BP_FirstPersonCharacter.uasset | 3 - .../BP_FirstPersonCharacterVaultIT.uasset | 3 + .../Blueprints/BP_ThirdPersonGameMode.uasset | 4 +- .../Content/Maps/ThirdPersonExampleMap.umap | 4 +- .../EndlessVendettaCharacter.cpp | 14 +++- .../EndlessVendettaCharacter.h | 14 +++- .../EndlessVendetta/MyVICharacterBase.cpp | 2 +- .../EndlessVendetta/MyVICharacterBase.h | 2 +- 19 files changed, 97 insertions(+), 62 deletions(-) create mode 100644 EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/indexLayout.xml create mode 100644 EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/projectSettingsUpdater.xml create mode 100644 EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/vcs.xml create mode 100644 EndlessVendetta/Content/BountySystem/testintesting.uasset delete mode 100644 EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacter.uasset create mode 100644 EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacterVaultIT.uasset diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/indexLayout.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/indexLayout.xml new file mode 100644 index 00000000..7b08163c --- /dev/null +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/projectSettingsUpdater.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/projectSettingsUpdater.xml new file mode 100644 index 00000000..4bb9f4d2 --- /dev/null +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/projectSettingsUpdater.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/vcs.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/vcs.xml new file mode 100644 index 00000000..6c0b8635 --- /dev/null +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml index a566056c..81e96e91 100644 --- a/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml +++ b/EndlessVendetta/.idea/.idea.EndlessVendetta/.idea/workspace.xml @@ -8,26 +8,17 @@ - - - - - - - - - - + - - - + - - + + + + - + @@ -42,36 +33,36 @@ - + { + "customColor": "", + "associatedIndex": 2 +} - { + "keyToString": { + "C++ Project.EndlessVendetta.executor": "Run", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "git-widget-placeholder": "GunRange-2.0", + "node.js.detected.package.eslint": "true", + "node.js.detected.package.tslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "node.js.selected.package.tslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "vue.rearranger.settings.migration": "true" }, - "keyToStringList": { - "rider.external.source.directories": [ - "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache", - "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache", - "C:\\Users\\Rafal\\AppData\\Local\\Symbols\\src" + "keyToStringList": { + "rider.external.source.directories": [ + "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\DecompilerCache", + "C:\\Users\\Rafal\\AppData\\Roaming\\JetBrains\\Rider2023.3\\resharper-host\\SourcesCache", + "C:\\Users\\Rafal\\AppData\\Local\\Symbols\\src" ] } -}]]> +} @@ -144,6 +135,7 @@ diff --git a/EndlessVendetta/Content/BountySystem/testintesting.uasset b/EndlessVendetta/Content/BountySystem/testintesting.uasset new file mode 100644 index 00000000..0c667c09 --- /dev/null +++ b/EndlessVendetta/Content/BountySystem/testintesting.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a52448bedde7fdbdaa6dd78db571d463666715dcf04c67bb55dedb81fe8d8488 +size 9233 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset index efdba3db..d02a566b 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06d7c8221d10354ec1e9be8f31b4d84447688c99f651d8e702849bac8846c4e8 -size 79266 +oid sha256:2cb0baa3cb244f0c771bf7f27cd6664ec6fd72000d44ba61106bcb06d8373c17 +size 79838 diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset index af5ea1b4..2981312d 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e1e829f4770985384af4baf7f94ed5089f11e12ec69b2ec09fb5f193a1ab960 -size 124465 +oid sha256:9e42efb6d4c620b7ca18fa500edcd1bfa3976190302e3814f5cce2b095699170 +size 136733 diff --git a/EndlessVendetta/Content/FirstPersonArms/Animations/NewFirstPerson_AnimBP.uasset b/EndlessVendetta/Content/FirstPersonArms/Animations/NewFirstPerson_AnimBP.uasset index 7076acfc..d6588e8e 100644 --- a/EndlessVendetta/Content/FirstPersonArms/Animations/NewFirstPerson_AnimBP.uasset +++ b/EndlessVendetta/Content/FirstPersonArms/Animations/NewFirstPerson_AnimBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:140293d5379e6f921760d290e4c078d0e2168f88b400901e5f9edb3433b8a359 -size 966483 +oid sha256:16c75ff1ae695d70ae4aa1d517049c8cb1c981d93a59ab470bc5534bccacd346 +size 964528 diff --git a/EndlessVendetta/Content/Levels/TrainingFacility.umap b/EndlessVendetta/Content/Levels/TrainingFacility.umap index 9b7d221c..530cab70 100644 --- a/EndlessVendetta/Content/Levels/TrainingFacility.umap +++ b/EndlessVendetta/Content/Levels/TrainingFacility.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7db21551a3a56def353e10eb4a8429d0980049797fd36509f2096a18a79c6f39 -size 679253 +oid sha256:2c78df31eabfc41ac0e3ae48be1a5b9f3750579d4cae774133a9da9f877e2f13 +size 680775 diff --git a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset index 6c8be37c..9d233377 100644 --- a/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset +++ b/EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:016cace4ca772f5945f13571260dfb094c56cf8abbd05c91dbf504546f0c1c96 +oid sha256:aecb50fea2c0d71ab625d938c375ba641ce01e27c30dbbe63cd6c931a83d8ee0 size 14831 diff --git a/EndlessVendetta/Plugins/VaultIt/Content/Anims/FirstPerson_AnimBP.uasset b/EndlessVendetta/Plugins/VaultIt/Content/Anims/FirstPerson_AnimBP.uasset index b0db1ee5..b67d5b88 100644 --- a/EndlessVendetta/Plugins/VaultIt/Content/Anims/FirstPerson_AnimBP.uasset +++ b/EndlessVendetta/Plugins/VaultIt/Content/Anims/FirstPerson_AnimBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68eed825e72503a48e339dc7ed9d75be769ec5149fddbd3750d43ef704f2135c -size 525536 +oid sha256:33ba7eb9dcdbb0b23d7d9e70b4ea40e03fe7973c0e46a70f672fc91a6e66ae71 +size 540695 diff --git a/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacter.uasset deleted file mode 100644 index abe09806..00000000 --- a/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacter.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:edaf3b6429e17258e879c82ded01267c2b2ef0ea5ef9b90566fbf2d131ff6d04 -size 284169 diff --git a/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacterVaultIT.uasset b/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacterVaultIT.uasset new file mode 100644 index 00000000..b73401e2 --- /dev/null +++ b/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_FirstPersonCharacterVaultIT.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7efa05f25b618c28daba0531d83db78f4f759a545553d421061d2dcd2a59110 +size 281495 diff --git a/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_ThirdPersonGameMode.uasset b/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_ThirdPersonGameMode.uasset index 21b5f924..8c61ec4d 100644 --- a/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_ThirdPersonGameMode.uasset +++ b/EndlessVendetta/Plugins/VaultIt/Content/Blueprints/BP_ThirdPersonGameMode.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:601cb27de27c951e53727edcafc483c5adbab6542c6196a1e4a50a569078bbe9 -size 14565 +oid sha256:949b694f7056a04e2c177861e817c56ef62ec36037c13be9f7baa72779aa540b +size 14549 diff --git a/EndlessVendetta/Plugins/VaultIt/Content/Maps/ThirdPersonExampleMap.umap b/EndlessVendetta/Plugins/VaultIt/Content/Maps/ThirdPersonExampleMap.umap index 6ed5e5eb..38bd7645 100644 --- a/EndlessVendetta/Plugins/VaultIt/Content/Maps/ThirdPersonExampleMap.umap +++ b/EndlessVendetta/Plugins/VaultIt/Content/Maps/ThirdPersonExampleMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e433412ff9ab29a88210b3b6a9a67910546e1dcca6a5110038d9050fba1a91f -size 160673 +oid sha256:ac684be13a824f310007c058fc593b60fdbf3c373791760b3fa6d4a43494bbe8 +size 160843 diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp index 47ece323..00b74640 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp @@ -50,6 +50,18 @@ void AEndlessVendettaCharacter::BeginPlay() // Call the base class Super::BeginPlay(); + // Set the fp skeletal mesh for the vault it plugin to use + TArray MeshActComps = GetComponentsByClass(USkeletalMeshComponent::StaticClass()); + for (auto MeshActorComponent : MeshActComps) + { + USkeletalMeshComponent* MeshSkeletalComp = Cast(MeshActorComponent); + if (MeshSkeletalComp->ComponentHasTag("FP_Mesh")) + { + FP_SkeletalMesh = MeshSkeletalComp; + break; + } + } + //Add Input Mapping Context if (APlayerController* PlayerController = Cast(Controller)) { @@ -642,4 +654,4 @@ void AEndlessVendettaCharacter::UpdateInventorySize(int Cols, int Rows) { UE_LOG(LogTemp, Warning, TEXT("No Vaild Inventory")); } -} +} \ No newline at end of file diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h index 81ab9c4f..bcebe73d 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.h @@ -25,11 +25,13 @@ UCLASS(config=Game) class AEndlessVendettaCharacter : public ACharacter { GENERATED_BODY() - + +protected: /** Pawn mesh: 1st person view (arms; seen only by self) */ - UPROPERTY(VisibleDefaultsOnly, Category=Mesh) + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Mesh) USkeletalMeshComponent* Mesh1P; - + +private: /** First person camera */ UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) UCameraComponent* FirstPersonCameraComponent; @@ -203,11 +205,17 @@ protected: void Interact(); protected: + + // Used by vault it plugin to run vaulting animations + USkeletalMeshComponent* FP_SkeletalMesh = nullptr; + // APawn interface virtual void SetupPlayerInputComponent(UInputComponent* InputComponent) override; // End of APawn interface public: + + UFUNCTION(BlueprintCallable, Category = "Stealth") void SetCrouch(); UFUNCTION(BlueprintCallable, Category = "Stealth") diff --git a/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.cpp b/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.cpp index 87a3e873..8127dea2 100644 --- a/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.cpp @@ -211,7 +211,7 @@ bool AMyVICharacterBase::CanVault_Implementation() const } // Animation instance is required to play vault montage - if (!GetMesh() || !GetMesh()->GetAnimInstance()) + if (!IsValid(FP_SkeletalMesh) || !IsValid(FP_SkeletalMesh->GetAnimInstance())) { UE_LOG(LogTemp, Warning, TEXT("Animation instance is required to play vault montage")); return false; diff --git a/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.h b/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.h index 08a271a6..40ae3f7f 100644 --- a/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.h +++ b/EndlessVendetta/Source/EndlessVendetta/MyVICharacterBase.h @@ -100,7 +100,7 @@ public: virtual UVIPawnVaultComponent* GetPawnVaultComponent_Implementation() const override; virtual UMotionWarpingComponent* GetMotionWarpingComponent_Implementation() const override; - virtual USkeletalMeshComponent* GetMeshForVaultMontage_Implementation() const override { return GetMesh(); } + virtual USkeletalMeshComponent* GetMeshForVaultMontage_Implementation() const override { return FP_SkeletalMesh; } virtual FVIAnimSet GetVaultAnimSet_Implementation() const override; virtual FVITraceSettings GetVaultTraceSettings_Implementation() const override; virtual FVector GetVaultDirection_Implementation() const override;