Update StarUniverseClient.cpp

This commit is contained in:
Kae 2024-03-18 17:12:42 +11:00
parent 4d9e2a37ae
commit 7d717489a9

View File

@ -553,9 +553,8 @@ bool UniverseClient::switchPlayer(Uuid const& uuid) {
return false; return false;
else if (auto data = m_playerStorage->maybeGetPlayerData(uuid)) { else if (auto data = m_playerStorage->maybeGetPlayerData(uuid)) {
if (reloadPlayer(*data, uuid, true, true)) { if (reloadPlayer(*data, uuid, true, true)) {
auto dance = Root::singleton().assets()->json("/player.config:swapDance"); if (auto dance = Root::singleton().assets()->json("/player.config").optString("swapDance"))
if (dance.isType(Json::Type::String)) m_mainPlayer->humanoid()->setDance(*dance);
m_mainPlayer->humanoid()->setDance(dance.toString());
return true; return true;
} }
} }