Resolve Money duplication between ANakedDesireCharacter and UGlobalSaveGameData

This commit is contained in:
2026-05-18 20:57:34 +03:00
parent a5bd139f62
commit 1c50237958
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);