diff --git a/Source/ols/Private/Components/OLSHealthComponent.cpp b/Source/ols/Private/Components/OLSHealthComponent.cpp index d7401e5..bb25266 100644 --- a/Source/ols/Private/Components/OLSHealthComponent.cpp +++ b/Source/ols/Private/Components/OLSHealthComponent.cpp @@ -187,21 +187,21 @@ void UOLSHealthComponent::DamageSelfDestruct(bool isFellOutOfWorld) return; } - FGameplayEffectSpecHandle SpecHandle = AbilitySystemComponent->MakeOutgoingSpec(damageGE, 1.0f, AbilitySystemComponent->MakeEffectContext()); - FGameplayEffectSpec* Spec = SpecHandle.Data.Get(); + FGameplayEffectSpecHandle specHandle = AbilitySystemComponent->MakeOutgoingSpec(damageGE, 1.0f, AbilitySystemComponent->MakeEffectContext()); + FGameplayEffectSpec* spec = specHandle.Data.Get(); - if (!Spec) + if (!spec) { // @TODO: replace this with our custom log. // UE_LOG(LogLyra, Error, TEXT("LyraHealthComponent: DamageSelfDestruct failed for owner [%s]. Unable to make outgoing spec for [%s]."), *GetNameSafe(GetOwner()), *GetNameSafe(DamageGE)); return; } - Spec->AddDynamicAssetTag(TAG_Gameplay_DamageSelfDestruct); + spec->AddDynamicAssetTag(TAG_Gameplay_DamageSelfDestruct); if (isFellOutOfWorld) { - Spec->AddDynamicAssetTag(TAG_Gameplay_FellOutOfWorld); + spec->AddDynamicAssetTag(TAG_Gameplay_FellOutOfWorld); } const float DamageAmount = GetMaxHealth(); @@ -209,7 +209,7 @@ void UOLSHealthComponent::DamageSelfDestruct(bool isFellOutOfWorld) // @TODO: Add LyraGameplayTags::SetByCaller_Damage. // Spec->SetSetByCallerMagnitude(LyraGameplayTags::SetByCaller_Damage, DamageAmount); - AbilitySystemComponent->ApplyGameplayEffectSpecToSelf(*Spec); + AbilitySystemComponent->ApplyGameplayEffectSpecToSelf(*spec); } }