Renamed local variable

This commit is contained in:
LongLy 2025-01-15 15:53:15 -07:00
parent 57be5728b7
commit fe68d8be31

View File

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