diff --git a/Source/items.cpp b/Source/items.cpp index f136bff40df..dbb85ddbbb3 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3023,11 +3023,13 @@ void CreatePlrItems(Player &player) } } + InitCursor(); for (auto &itemChoice : loadout.items) { _item_indexes itemData = gbIsHellfire && itemChoice.hellfire != _item_indexes::IDI_NONE ? itemChoice.hellfire : itemChoice.diablo; if (itemData != _item_indexes::IDI_NONE) CreateStartingItem(player, itemData); } + FreeCursor(); if (loadout.gold > 0) { Item &goldItem = player.InvList[player._pNumInv]; diff --git a/test/player_test.cpp b/test/player_test.cpp index 5d4d7a43daa..40dec523fac 100644 --- a/test/player_test.cpp +++ b/test/player_test.cpp @@ -188,8 +188,6 @@ TEST(Player, CreatePlayer) // Please provide them so that the tests can run successfully ASSERT_TRUE(HaveSpawn() || HaveDiabdat()); - InitCursor(); - LoadPlayerDataFiles(); LoadItemData(); Players.resize(1); diff --git a/test/writehero_test.cpp b/test/writehero_test.cpp index 30d38396062..adef0be6db6 100644 --- a/test/writehero_test.cpp +++ b/test/writehero_test.cpp @@ -384,7 +384,6 @@ TEST(Writehero, pfile_write_hero) MyPlayerId = 0; MyPlayer = &Players[MyPlayerId]; - InitCursor(); LoadSpellData(); LoadPlayerDataFiles(); LoadItemData();