Resolve Money duplication between ANakedDesireCharacter and UGlobalSaveGameData

This commit is contained in:
koritsa
2026-05-18 20:57:34 +03:00
parent 28ca1d0bd3
commit 84b0432be8
5 changed files with 17 additions and 9 deletions
@@ -154,6 +154,11 @@ void ANakedDesireCharacter::BeginPlay()
UGlobalSaveGameData* SaveGameData = UGlobalSaveGameData::LoadOrCreateSaveGame(DefaultPlayerClothing, DefaultWardrobeClothing);
if (SaveGameData)
{
Money = FMath::RoundToInt(SaveGameData->Money);
}
SetupClothingSlots();
ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingEquip);