fix scale replication and other fixes

This commit is contained in:
Arnaud Jamin
2023-10-13 00:37:07 -04:00
parent 762167e3c2
commit 7b0ed3d05f
14 changed files with 477 additions and 119 deletions
+8 -1
View File
@@ -625,7 +625,14 @@ void ACogSampleCharacter::OnGhostTagNewOrRemoved(const FGameplayTag InTag, int32
//--------------------------------------------------------------------------------------------------------------------------
void ACogSampleCharacter::OnScaleAttributeChanged(const FOnAttributeChangeData& Data)
{
Scale = Data.NewValue;
//----------------------------------------------------------------------------------
// 'Data.NewValue' is not used because it seems to only corresponds to the changes
// of the BaseValue which do not account for the temporary modifiers.
//----------------------------------------------------------------------------------
const float CurrentScaleValue = AbilitySystem->GetNumericAttribute(Data.Attribute);
Scale = CurrentScaleValue;
MARK_PROPERTY_DIRTY_FROM_NAME(ACogSampleCharacter, Scale, this);
OnRep_Scale();
}