Bugfix : display player view obturation effect when player is hit (damage amount remain to fix)

This commit is contained in:
Emilie Schott 2025-03-15 03:02:05 +01:00
parent 6113e1fb8c
commit 7c56419186
5 changed files with 9 additions and 8 deletions

Binary file not shown.

BIN
Content/Legumix/Levels/LVL_GYM_00.umap (Stored with Git LFS)

Binary file not shown.

BIN
Content/Legumix/Player/BP_Play.uasset (Stored with Git LFS)

Binary file not shown.

View File

@ -26,7 +26,7 @@ ALMPlayer::ALMPlayer(const FObjectInitializer& ObjectInitializer)
SpreadStream = FRandomStream(FMath::Rand()); SpreadStream = FRandomStream(FMath::Rand());
HealthComponent = CreateDefaultSubobject<ULMHealthComponent>(TEXT("HealthComponent")); HealthComponent = CreateDefaultSubobject<ULMHealthComponent>(TEXT("HealthComponent"));
HitPeriodLengthInSeconds = 15.f; HitPeriodLengthInSeconds = 15.f;
bHitPeriodInProgress = false; bHitPeriodInProgress = false;
TimeOfTheLastDamage = 0.f; TimeOfTheLastDamage = 0.f;
@ -46,7 +46,7 @@ void ALMPlayer::BeginPlay()
GetCamera()->SetFieldOfView(ULMUserSettings::GetLegumixUserSettings()->FieldOfView); GetCamera()->SetFieldOfView(ULMUserSettings::GetLegumixUserSettings()->FieldOfView);
HealthComponent->OnHealthChanged.AddDynamic(this, &ALMPlayer::SetDisplayDamageParameters); // HealthComponent->OnHealthChanged.AddDynamic(this, &ALMPlayer::SetDisplayDamageParameters);
MovementModeChangedDelegate.AddUniqueDynamic(this, &ALMPlayer::MovementChanged); MovementModeChangedDelegate.AddUniqueDynamic(this, &ALMPlayer::MovementChanged);
} }

View File

@ -15,6 +15,7 @@ class ULMWeaponManager;
class ULMHealthComponent; class ULMHealthComponent;
class UMaterialInstanceDynamic; class UMaterialInstanceDynamic;
class ALMAmmo; class ALMAmmo;
class ULMHitBox;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnRequestUnpauseSignature); DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnRequestUnpauseSignature);