From 08aff94716005f78191bdac5e9ad2758124c5eaf Mon Sep 17 00:00:00 2001 From: charnet3d Date: Thu, 16 Jan 2025 03:23:38 +0100 Subject: [PATCH] Combat mechanics, Level design and an intro Cutscene * Added a cinematic on level start that shows the way ahead * The HUD and Player character are hidden and input disabled during the cutscene. Then reenabled after. * Various level design changes. * Added a damage multiplier to weapon rarities that's taken into account. * Changed stun chance calculation to make it depend on the damage inflicted and enemy health. To avoid constant stuns with the SMG. * Fixed input still working after player death. * Explosive barrels now make other barrels explode in chain. --- .../Maps/Demonstration_Castle.umap | 4 +- .../FantasyBundle/Meshes/SM_Bridge01.uasset | 4 +- .../FantasyBundle/Meshes/SM_Bridge02.uasset | 4 +- .../FantasyBundle/Meshes/SM_Bridge03.uasset | 4 +- .../Khaimera/KhaimeraPlayerCharacter.uasset | 4 +- .../Belica/LtBelicaPlayerCharacter.uasset | 4 +- .../MF_CharacterEffects.uasset | 4 +- .../MaterialFunctions/MF_DeathFade.uasset | 4 +- .../MaterialFunctions/MF_HitFlash.uasset | 4 +- .../Leather/ML_Light_Leather_Brown2.uasset | 4 +- .../Leather/ML_ThinLeather01.uasset | 4 +- .../Metal/ML_DullPanelMetal.uasset | 4 +- .../MaterialLayers/Metal/ML_blue_Metal.uasset | 4 +- .../Materials/MF_RevanantUltimate.uasset | 4 +- .../Materials/Layers/ML_Duster_Grime.uasset | 4 +- .../Materials/Layers/ML_Duster_Leather.uasset | 4 +- .../Layers/ML_Duster_Scratches.uasset | 4 +- .../Materials/Layers/ML_Metal.uasset | 4 +- .../Layers/ML_StrapsBelts_Leather.uasset | 4 +- .../Materials/Layers/ML_WoolFabric.uasset | 4 +- .../Parent/M_Revenant_RavenQuill_Body.uasset | 4 +- .../Revenant/RevenantCharacterBP.uasset | 4 +- .../DataTable/ItemRarityDataTable.uasset | 4 +- .../_Game/DataTable/WeaponDataTable.uasset | 4 +- .../EnemyController/EnemyBehaviorTree.uasset | 4 +- Content/_Game/HUD/ShooterHUDBP.uasset | 4 +- Content/_Game/Health/HealthBP.uasset | 4 +- .../Sequences/BPI_LevelSequenceLink.uasset | 3 + Content/_Game/Sequences/LevelStart.uasset | 3 + .../_Game/Sequences/TestLevelSequence.uasset | 3 + .../Weapons/BaseWeapon/BaseWeaponBP.uasset | 4 +- Source/Shooter/Enemy.cpp | 11 ++-- Source/Shooter/Explosive.cpp | 65 +++++++++++++------ Source/Shooter/Explosive.h | 8 ++- Source/Shooter/Item.cpp | 1 + Source/Shooter/Item.h | 13 +++- Source/Shooter/ShooterCharacter.cpp | 20 +++--- Source/Shooter/ShooterPlayerController.cpp | 28 +++++++- Source/Shooter/ShooterPlayerController.h | 3 +- 39 files changed, 177 insertions(+), 93 deletions(-) create mode 100644 Content/_Game/Sequences/BPI_LevelSequenceLink.uasset create mode 100644 Content/_Game/Sequences/LevelStart.uasset create mode 100644 Content/_Game/Sequences/TestLevelSequence.uasset diff --git a/Content/FantasyBundle/Maps/Demonstration_Castle.umap b/Content/FantasyBundle/Maps/Demonstration_Castle.umap index 9d890a33..1e4af2ff 100644 --- a/Content/FantasyBundle/Maps/Demonstration_Castle.umap +++ b/Content/FantasyBundle/Maps/Demonstration_Castle.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd68c1a8262ea038df9e876069d2b93663893c36f89b5aa0f569093276e157ca -size 176312307 +oid sha256:24366f9605acf6118f54f3e9a9e2a706521ee7a394986feba49fdd8bb4031010 +size 176971585 diff --git a/Content/FantasyBundle/Meshes/SM_Bridge01.uasset b/Content/FantasyBundle/Meshes/SM_Bridge01.uasset index b1e6c71c..a685c20c 100644 --- a/Content/FantasyBundle/Meshes/SM_Bridge01.uasset +++ b/Content/FantasyBundle/Meshes/SM_Bridge01.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb2191672912eb865ab977d185892b802bc81421735f0e239ace30f4c5d8aef7 -size 229017 +oid sha256:8779ae38a65db32fa44c5a1bc729a8eaed39557e9f93cf9ca495a952a79e1378 +size 239734 diff --git a/Content/FantasyBundle/Meshes/SM_Bridge02.uasset b/Content/FantasyBundle/Meshes/SM_Bridge02.uasset index d33a1046..2c5b86c6 100644 --- a/Content/FantasyBundle/Meshes/SM_Bridge02.uasset +++ b/Content/FantasyBundle/Meshes/SM_Bridge02.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e887ac390bfe220a652d06decaf8194c94ac57dab6655a62227f68aef5538bc -size 218571 +oid sha256:dd6016e59c0381e0aa0f8b54ab3bcba7efe5ab4e0b8c730a8cb5a46a4c41dec3 +size 213193 diff --git a/Content/FantasyBundle/Meshes/SM_Bridge03.uasset b/Content/FantasyBundle/Meshes/SM_Bridge03.uasset index afc5d62c..312c2986 100644 --- a/Content/FantasyBundle/Meshes/SM_Bridge03.uasset +++ b/Content/FantasyBundle/Meshes/SM_Bridge03.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac4dd022a6ec41afdd48abd9783825ef943bae2ba117400c0f21e46300c39c81 -size 222804 +oid sha256:df25619d326ea12f5f8ad9cc78fa5336cc4f9103ef25decd37f1708b392d8b96 +size 225790 diff --git a/Content/ParagonKhaimera/Characters/Heroes/Khaimera/KhaimeraPlayerCharacter.uasset b/Content/ParagonKhaimera/Characters/Heroes/Khaimera/KhaimeraPlayerCharacter.uasset index 4ad75524..76f915c7 100644 --- a/Content/ParagonKhaimera/Characters/Heroes/Khaimera/KhaimeraPlayerCharacter.uasset +++ b/Content/ParagonKhaimera/Characters/Heroes/Khaimera/KhaimeraPlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ab795070dfcda0e0bfc8d0d8f896ec0d0246481f7f2fccf73c1626eb8cf46d4 -size 268599 +oid sha256:8be834c49bf191425f46a665c993de832421c117d7653a13f26045b10125a8cd +size 189395 diff --git a/Content/ParagonLtBelica/Characters/Heroes/Belica/LtBelicaPlayerCharacter.uasset b/Content/ParagonLtBelica/Characters/Heroes/Belica/LtBelicaPlayerCharacter.uasset index 9c666100..8340fbe6 100644 --- a/Content/ParagonLtBelica/Characters/Heroes/Belica/LtBelicaPlayerCharacter.uasset +++ b/Content/ParagonLtBelica/Characters/Heroes/Belica/LtBelicaPlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4523ecbe4139ba66ff75d981fe4dcec6b1d50cbcc8ad584a0333ece954c5e47 -size 277483 +oid sha256:48cb6403fd2abbe4307f606abdb80ba040b15361e7f2abea8e5faf8e8d9cd412 +size 183027 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_CharacterEffects.uasset b/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_CharacterEffects.uasset index 3a975424..192764c0 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_CharacterEffects.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_CharacterEffects.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8342bf44900c0dd57710d88f7867dc40d72369c7aac232991788d6d395eb0692 -size 79855 +oid sha256:7b01324130c8e1bb5cddbb9fa1487af0afad0eb68029231b075d7ce97cd571ce +size 24094 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_DeathFade.uasset b/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_DeathFade.uasset index 84a9de42..10685f2d 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_DeathFade.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_DeathFade.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c264d3fa14b15fc0f0d5c9d755a460b67025246c7300411c417c88af2a8d0eb3 -size 148422 +oid sha256:6d49c92ca8c816a0fb385dadf13042bc559076a5f928b4942f05b212744e3a54 +size 50463 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_HitFlash.uasset b/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_HitFlash.uasset index ec775870..817b0b0e 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_HitFlash.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialFunctions/MF_HitFlash.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a224baff621eede47aad6f62d596c578ba4c2002d26cdf6ba0b359b068502b19 -size 82836 +oid sha256:4cf5a99d6d72c7a213a65816ca2b6018ba6d7edda670c9e939a3d9e28539163c +size 28722 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_Light_Leather_Brown2.uasset b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_Light_Leather_Brown2.uasset index 8621913e..0aef9715 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_Light_Leather_Brown2.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_Light_Leather_Brown2.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae6f59d6fede2b50ebffeb4f9205072e454aa5ee18650c5889cb8c02bd810c7a -size 146327 +oid sha256:8487b46288cb7e77df450af55982ad4366496854efb3c50b38023be0182774f8 +size 35995 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_ThinLeather01.uasset b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_ThinLeather01.uasset index 67024384..7e7d2f39 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_ThinLeather01.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Leather/ML_ThinLeather01.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07fdf2291dac184e82e6d2729a2eaf7c10b37ed02d5596f509b0bc4e27a3b770 -size 128535 +oid sha256:d43bbd4dec05b2fec50be35130244d36a1a191480eb77de7b786fc74e033b7a5 +size 31121 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_DullPanelMetal.uasset b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_DullPanelMetal.uasset index 64a07fd8..38df02c4 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_DullPanelMetal.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_DullPanelMetal.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d67ca7c75d1cb039a7081033c716b533d306916bc6b3f2a37d4d71522622b9f -size 124159 +oid sha256:e5426fb37997e6bc74744afc094973d4aa48a7aa79062fd72b307aaed5b246a7 +size 31516 diff --git a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_blue_Metal.uasset b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_blue_Metal.uasset index 236cbd7c..579d6ca2 100644 --- a/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_blue_Metal.uasset +++ b/Content/ParagonRevenant/Characters/Global/MaterialLayers/Metal/ML_blue_Metal.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36d950986a1ac44926b36d9e0596252435d5055260471a54ec6f63dc5ca6564f -size 132810 +oid sha256:4fd6c282a01caf764a22f7c43d2a278f474fc813c190f6474798871b5183ef15 +size 48505 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Materials/MF_RevanantUltimate.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Materials/MF_RevanantUltimate.uasset index 9ea6cf22..ca905945 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Materials/MF_RevanantUltimate.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Materials/MF_RevanantUltimate.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd1bbc80d3f4be6d6d36af5218a0058a9770aaf084a2191f62a8a079fa9e4337 -size 91444 +oid sha256:24f2baab9f43e4d21201ff2f61bef2cdffcf65fecfb572b49b8311d8bba364b5 +size 36281 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Grime.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Grime.uasset index 6a6fae75..7796fbe2 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Grime.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Grime.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc252d833dd664efb869bd9c017ff2b22fe45066ea4e6d4860b05e75e4bf3960 -size 95859 +oid sha256:96ca922f16d8fe67e94388851ea9477661daafa65a0faa97b58a21dd88d0d038 +size 11504 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Leather.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Leather.uasset index d6c7337b..ae86f9c5 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Leather.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Leather.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15a266869abd55728f651384bdea50bb955bff51e5e0385888a001d1eef549ee -size 125811 +oid sha256:351cee6e680d41e3274b89650a49865ae7f317b47aca34f2787fc8bff48e94a3 +size 31984 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Scratches.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Scratches.uasset index f9108a7b..258a4dcc 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Scratches.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Duster_Scratches.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff62fbe54b21ee1c7b13ce60b47e217046f4577b730f838c668b941013815866 -size 121832 +oid sha256:0b9ebd66da7ad55657ef7a0bade69aee120c8b7bc07e95726c7d60c494a634c5 +size 11748 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Metal.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Metal.uasset index 24ac408b..69060e00 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Metal.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_Metal.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a82078baa1a37c98b3a6523d9016cefbf80401ad5ad93b0ac68d182292e5c978 -size 105443 +oid sha256:ce40226cee63c442f8525df431f31c3373253c4a987002a097982c3e51cc09b6 +size 16407 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_StrapsBelts_Leather.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_StrapsBelts_Leather.uasset index d8507fe8..4d69b340 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_StrapsBelts_Leather.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_StrapsBelts_Leather.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:35cc2e3e6856ff3f404910055108551097159072b105ff62432cbcc8fe1913fd -size 145446 +oid sha256:906439d399d19222dc6d3a15aeef58b522833812f02a389ffe5e2f41a826c39f +size 32651 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_WoolFabric.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_WoolFabric.uasset index 4d07332b..dfc76abe 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_WoolFabric.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Layers/ML_WoolFabric.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dacc746f8d0492b690a5cd3b6557ad03c484c46cff1e7ab14087bb288227042c -size 95727 +oid sha256:52318af26b1cf12157f9d141cc53c89aa55417c6977dfb55521e7b5185b858fc +size 20411 diff --git a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Parent/M_Revenant_RavenQuill_Body.uasset b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Parent/M_Revenant_RavenQuill_Body.uasset index 6c8bc723..48ed143b 100644 --- a/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Parent/M_Revenant_RavenQuill_Body.uasset +++ b/Content/ParagonRevenant/Characters/Heroes/Revenant/Skins/RavenQuill/Materials/Parent/M_Revenant_RavenQuill_Body.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3151991500c78ee0985123899ecc34139eb2b73dbc55eefc4c7e0bbf7daa52cd -size 188851 +oid sha256:a81319b5bf233e27892e2a4588d6c9688e6b77c1e9e809d2926043a69be0c2b0 +size 67517 diff --git a/Content/_Game/Character/Revenant/RevenantCharacterBP.uasset b/Content/_Game/Character/Revenant/RevenantCharacterBP.uasset index c7f04c23..314e605c 100644 --- a/Content/_Game/Character/Revenant/RevenantCharacterBP.uasset +++ b/Content/_Game/Character/Revenant/RevenantCharacterBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:461876f1f60688caaca6582022912de4f98e146bb435973105a03426fb0b4f45 -size 49283 +oid sha256:d00e9bd01608dcdc40194ed59109f8074650ebc969efaa2c449b43c0a62dd9ea +size 49358 diff --git a/Content/_Game/DataTable/ItemRarityDataTable.uasset b/Content/_Game/DataTable/ItemRarityDataTable.uasset index f452da1c..250006ed 100644 --- a/Content/_Game/DataTable/ItemRarityDataTable.uasset +++ b/Content/_Game/DataTable/ItemRarityDataTable.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a7e5f1a8870d7c40f507efd733f3cf04f7c5d1920a6e337cb554dc8c7ff24e0 -size 4701 +oid sha256:51a3e4721c35ecd89d90f409d0ef500a56981ae5b3ba800e3393ac1997ad6403 +size 4948 diff --git a/Content/_Game/DataTable/WeaponDataTable.uasset b/Content/_Game/DataTable/WeaponDataTable.uasset index 154b1ef5..883756cc 100644 --- a/Content/_Game/DataTable/WeaponDataTable.uasset +++ b/Content/_Game/DataTable/WeaponDataTable.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af3a9a2faabfe1a92ac99558f54a75d3b3fc5eb63c22fb03fae652056a4eb164 -size 11253 +oid sha256:4e5673a9091c1d8f4b3ff233ebf60d80e18019187a241c36dc571b784443ef94 +size 11410 diff --git a/Content/_Game/EnemyController/EnemyBehaviorTree.uasset b/Content/_Game/EnemyController/EnemyBehaviorTree.uasset index 92593af7..e755e301 100644 --- a/Content/_Game/EnemyController/EnemyBehaviorTree.uasset +++ b/Content/_Game/EnemyController/EnemyBehaviorTree.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6b5df6789363391397440cc69185dd35781eac6e6c22b31c06cbb68e0bd91adc -size 33155 +oid sha256:e09f7b53684bedd23dc85a765974155ca821545a9b4cff4c552e03dbd59037ff +size 35310 diff --git a/Content/_Game/HUD/ShooterHUDBP.uasset b/Content/_Game/HUD/ShooterHUDBP.uasset index 5f146df4..6e3ac231 100644 --- a/Content/_Game/HUD/ShooterHUDBP.uasset +++ b/Content/_Game/HUD/ShooterHUDBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ef39e3dd085acd411c5e1d274fa140d3f673e0dc35388c5fa0fe9a39f01ede9 -size 283816 +oid sha256:1aa1bccdd34c3abd1f5e684678d194ed4348b1e1380368ba22ee4159aefd9d67 +size 297535 diff --git a/Content/_Game/Health/HealthBP.uasset b/Content/_Game/Health/HealthBP.uasset index fb5aaf5e..efa134ba 100644 --- a/Content/_Game/Health/HealthBP.uasset +++ b/Content/_Game/Health/HealthBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:942710b92246f055eb4026409065b28c73aa58bcdc8a1f366c3bf2608e1b7b04 -size 114490 +oid sha256:f6197d5551d6b6d478c78542184aacaffb1bbdcf1ebe50c768bb3ebee0a8e246 +size 113781 diff --git a/Content/_Game/Sequences/BPI_LevelSequenceLink.uasset b/Content/_Game/Sequences/BPI_LevelSequenceLink.uasset new file mode 100644 index 00000000..3da4a727 --- /dev/null +++ b/Content/_Game/Sequences/BPI_LevelSequenceLink.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ddfe7eff4ab09e8f28d35f7d8776f95767502eacd297af89d18d0352afe8f72 +size 9303 diff --git a/Content/_Game/Sequences/LevelStart.uasset b/Content/_Game/Sequences/LevelStart.uasset new file mode 100644 index 00000000..214208aa --- /dev/null +++ b/Content/_Game/Sequences/LevelStart.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fee3c908a0f43dd6554aacff8960a1392fd550c3b0141d830d5ab5200794f5b +size 72849 diff --git a/Content/_Game/Sequences/TestLevelSequence.uasset b/Content/_Game/Sequences/TestLevelSequence.uasset new file mode 100644 index 00000000..214c6faa --- /dev/null +++ b/Content/_Game/Sequences/TestLevelSequence.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:646ca36bf2e098b2acd00d6d33b2b8118fca638fd31fc766f74eb0677eaf2128 +size 45034 diff --git a/Content/_Game/Weapons/BaseWeapon/BaseWeaponBP.uasset b/Content/_Game/Weapons/BaseWeapon/BaseWeaponBP.uasset index e7e330e4..c254bff2 100644 --- a/Content/_Game/Weapons/BaseWeapon/BaseWeaponBP.uasset +++ b/Content/_Game/Weapons/BaseWeapon/BaseWeaponBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:84512d0492609b1b62816fa4d737ffa03e7d6017c946cfac45adc668b9aaad39 -size 75352 +oid sha256:d4d06ddbb35df5dfc1b671b8c72837a1123637c7eb944e6130544ccff07a174b +size 76000 diff --git a/Source/Shooter/Enemy.cpp b/Source/Shooter/Enemy.cpp index 6c77ac98..af497299 100644 --- a/Source/Shooter/Enemy.cpp +++ b/Source/Shooter/Enemy.cpp @@ -30,7 +30,7 @@ AEnemy::AEnemy() : bCanHitReact(true), HitNumberDestroyTime(1.5f), bStunned(false), - StunChance(.5f), + StunChance(0.8f), AttackLFast(TEXT("AttackLFast")), AttackRFast(TEXT("AttackRFast")), AttackL(TEXT("AttackL")), @@ -235,7 +235,7 @@ void AEnemy::CombatRangeOverlap(UPrimitiveComponent* OverlappedComponent, AActor if (!EnemyController) return; EnemyController->GetBlackboardComponent()->SetValueAsBool(TEXT("InAttackRange"), true); - //UE_LOG(LogTemp, Warning, TEXT("overlap player")); + //UE_LOG(LogTemp, Warning, TEXT("overlap player: %d"), static_cast(bInAttackRange)); } void AEnemy::CombatRangeEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, @@ -427,10 +427,13 @@ float AEnemy::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AC if (bDying) return DamageInflicted; ShowHealthBar(); - + + // Determine actual Stun Chance based on health and damage inflicted + float ActualStunChance = DamageInflicted / (Health / 10.f) * StunChance; + // Determine whether bullet hit stuns const float Stunned = FMath::FRandRange(0.f, 1.f); - if (Stunned <= StunChance) + if (Stunned <= ActualStunChance) { // Stun the Enemy PlayHitMontage(FName("HitReactFront")); diff --git a/Source/Shooter/Explosive.cpp b/Source/Shooter/Explosive.cpp index 53983f19..17eb9895 100644 --- a/Source/Shooter/Explosive.cpp +++ b/Source/Shooter/Explosive.cpp @@ -15,7 +15,8 @@ // Sets default values AExplosive::AExplosive() : - Damage(40.f) + Damage(40.f), + Exploded(false) { // 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; @@ -41,27 +42,53 @@ void AExplosive::Tick(float DeltaTime) } -void AExplosive::BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController) +void AExplosive::Explode(AActor* Shooter, AController* ShooterController) { - if (ExplosionSound) - { - UGameplayStatics::PlaySoundAtLocation(this, ExplosionSound, GetActorLocation()); - } + Exploded = true; + + if (ExplosionSound) + { + UGameplayStatics::PlaySoundAtLocation(this, ExplosionSound, GetActorLocation()); + } - if (ExplosionParticles) - { - UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ExplosionParticles, HitResult.Location, FRotator(0.0), true); - } + if (ExplosionParticles) + { + UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ExplosionParticles, GetActorLocation(), FRotator(0.0), true); + } - // Apply explosive damage - TArray OverlappingActors; - GetOverlappingActors(OverlappingActors, ACharacter::StaticClass()); + // Apply explosive damage + TArray OverlappingActors; + GetOverlappingActors(OverlappingActors, ACharacter::StaticClass()); - for (auto Actor : OverlappingActors) - { - UGameplayStatics::ApplyDamage(Actor, Damage, ShooterController, Shooter, UDamageType::StaticClass()); - } - - Destroy(); + for (auto Actor : OverlappingActors) + { + UGameplayStatics::ApplyDamage(Actor, Damage, ShooterController, Shooter, UDamageType::StaticClass()); + } + + // Other explosives + OverlappingActors.Empty(); + GetOverlappingActors(OverlappingActors, AExplosive::StaticClass()); + for (auto Actor : OverlappingActors) + { + AExplosive* Explosive = Cast(Actor); + if (Explosive && Explosive != this && !Explosive->Exploded) + UGameplayStatics::ApplyDamage(Actor, Damage, ShooterController, Shooter, UDamageType::StaticClass()); + } + + Destroy(); +} + +void AExplosive::BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController) +{ + Explode(Shooter, ShooterController); +} + +float AExplosive::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, + AActor* DamageCauser) +{ + Super::TakeDamage(DamageAmount, DamageEvent, EventInstigator, DamageCauser); + + Explode(DamageCauser, EventInstigator); + return DamageAmount; } diff --git a/Source/Shooter/Explosive.h b/Source/Shooter/Explosive.h index 3faf6f93..d023b65c 100644 --- a/Source/Shooter/Explosive.h +++ b/Source/Shooter/Explosive.h @@ -24,7 +24,8 @@ public: protected: // Called when the game starts or when spawned virtual void BeginPlay() override; - + + void Explode(AActor* Shooter, AController* ShooterController); private: /** Particles to spawn when hit by bullets */ @@ -46,9 +47,14 @@ private: /** Damage amount for explosive */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true)) float Damage; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true)) + bool Exploded; public: // Called every frame virtual void Tick(float DeltaTime) override; virtual void BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController) override; + + virtual float TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override; }; diff --git a/Source/Shooter/Item.cpp b/Source/Shooter/Item.cpp index d7404ae7..8fd70d47 100644 --- a/Source/Shooter/Item.cpp +++ b/Source/Shooter/Item.cpp @@ -210,6 +210,7 @@ void AItem::OnConstruction(const FTransform& Transform) { GetItemMesh()->SetCustomDepthStencilValue(RarityRow->CustomDepthStencil); } + DamageMultiplier = RarityRow->DamageMultiplier; if (MaterialInstance) { diff --git a/Source/Shooter/Item.h b/Source/Shooter/Item.h index d1fef3c8..79093683 100644 --- a/Source/Shooter/Item.h +++ b/Source/Shooter/Item.h @@ -35,7 +35,7 @@ enum class EItemRarity : uint8 UENUM(BlueprintType) enum class EItemState : uint8 { - EIS_Pickup UMETA(DisplayName = "Damaged"), + EIS_Pickup UMETA(DisplayName = "Pickup"), EIS_EquipInterping UMETA(DisplayName = "EquipInterping"), EIS_PickedUp UMETA(DisplayName = "PickedUp"), EIS_Equipped UMETA(DisplayName = "Equipped"), @@ -75,6 +75,9 @@ struct FItemRarityTable : public FTableRowBase UPROPERTY(EditAnywhere, BlueprintReadWrite) int32 CustomDepthStencil; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + float DamageMultiplier; }; UCLASS() @@ -305,6 +308,10 @@ private: /** Background icon for the inventory */ UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Rarity, meta = (AllowPrivateAccess = true)) UTexture2D* IconBackground; + + /** Damage multiplier applied on the weapon damage */ + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Rarity, meta = (AllowPrivateAccess = true)) + float DamageMultiplier; public: FORCEINLINE UWidgetComponent* GetPickupWidget() const { return PickupWidget; } @@ -345,10 +352,12 @@ public: FORCEINLINE void SetDynamicMaterialInstance(UMaterialInstanceDynamic* Instance) { DynamicMaterialInstance = Instance; } FORCEINLINE FLinearColor GetGlowColor() const { return GlowColor; } - + FORCEINLINE void SetMaterialIndex(int32 Index) { MaterialIndex = Index; } FORCEINLINE int32 GetMaterialIndex() const { return MaterialIndex; } + FORCEINLINE float GetDamageMultiplier() const { return DamageMultiplier; } + /** Called from the AShooterCharacter class */ void StartItemCurve(AShooterCharacter* Char, bool bForcePlaySound = false); diff --git a/Source/Shooter/ShooterCharacter.cpp b/Source/Shooter/ShooterCharacter.cpp index dca20792..aa679111 100644 --- a/Source/Shooter/ShooterCharacter.cpp +++ b/Source/Shooter/ShooterCharacter.cpp @@ -61,8 +61,8 @@ AShooterCharacter::AShooterCharacter() : CameraInterpDistance(150.f), CameraInterpElevation(55.f), // Starting ammo amounts - Starting9mmAmmo(85), - StartingARAmmo(120), + Starting9mmAmmo(15), + StartingARAmmo(0), // Combat variables CombatState(ECombatState::ECS_Unoccupied), bCrouching(false), @@ -238,6 +238,12 @@ void AShooterCharacter::Die() if (bDying) return; bDying = true; + APlayerController* PC = UGameplayStatics::GetPlayerController(this, 0); + if (PC) + { + DisableInput(PC); + } + if (!DeathMontage) return; UAnimInstance* AnimInstance = GetMesh()->GetAnimInstance(); @@ -249,11 +255,6 @@ void AShooterCharacter::Die() void AShooterCharacter::FinishDeath() { GetMesh()->bPauseAnims = true; - APlayerController* PC = UGameplayStatics::GetPlayerController(this, 0); - if (PC) - { - DisableInput(PC); - } } // Called every frame @@ -691,6 +692,7 @@ void AShooterCharacter::FireWeapon() if (!WeaponHasAmmo()) { ReloadWeapon(); + return; } PlayFireSound(); @@ -788,12 +790,12 @@ void AShooterCharacter::SendBullet() float damageToApply; if (BeamHitResult.BoneName.ToString() == HitEnemy->GetHeadBone()) { - damageToApply = EquippedWeapon->GetHeadshotDamage(); + damageToApply = EquippedWeapon->GetHeadshotDamage() * EquippedWeapon->GetDamageMultiplier(); HitEnemy->ShowHitNumber(damageToApply, BeamHitResult.Location, true); } else { - damageToApply = EquippedWeapon->GetDamage(); + damageToApply = EquippedWeapon->GetDamage() * EquippedWeapon->GetDamageMultiplier(); HitEnemy->ShowHitNumber(damageToApply, BeamHitResult.Location, false); } diff --git a/Source/Shooter/ShooterPlayerController.cpp b/Source/Shooter/ShooterPlayerController.cpp index b3b6a4d6..dc4b9137 100644 --- a/Source/Shooter/ShooterPlayerController.cpp +++ b/Source/Shooter/ShooterPlayerController.cpp @@ -21,7 +21,33 @@ void AShooterPlayerController::BeginPlay() if (HUDOverlay) { HUDOverlay->AddToViewport(); - HUDOverlay->SetVisibility(ESlateVisibility::Visible); + HUDOverlay->SetVisibility(ESlateVisibility::Hidden); } } } + +void AShooterPlayerController::GameHasEnded(AActor* EndGameFocus, bool bIsWinner) +{ + Super::GameHasEnded(EndGameFocus, bIsWinner); + HUDOverlay->RemoveFromParent(); + + /*if (bIsWinner) + { + UUserWidget* WinScreen = CreateWidget(this, WinScreenClass); + if (WinScreen != nullptr) + { + WinScreen->AddToViewport(); + } + } + else + { + UUserWidget* LoseScreen = CreateWidget(this, LoseScreenClass); + if (LoseScreen != nullptr) + { + LoseScreen->AddToViewport(); + } + } + + GetWorldTimerManager().SetTimer(RestartTimer, this, &APlayerController::RestartLevel, RestartDelay);*/ +} + diff --git a/Source/Shooter/ShooterPlayerController.h b/Source/Shooter/ShooterPlayerController.h index 3ef5fa24..13fa44f9 100644 --- a/Source/Shooter/ShooterPlayerController.h +++ b/Source/Shooter/ShooterPlayerController.h @@ -17,7 +17,8 @@ class SHOOTER_API AShooterPlayerController : public APlayerController GENERATED_BODY() public: AShooterPlayerController(); - + virtual void GameHasEnded(class AActor* EndGameFocus = nullptr, bool bIsWinner = false) override; + protected: virtual void BeginPlay() override;