diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-24 17:54:31 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-24 17:54:31 +1000 |
commit | a2d901bd66178bbaacc2fec3acd07e7a27b9235f (patch) | |
tree | cc4ed0a2d3403d5e3a02c3e0482adfc840ce5121 /source/game/StarUniverseClient.cpp | |
parent | 5f0e44d60e6925dc3c9e6a6888e540012d4ddaa7 (diff) |
Fix ToolUser exception when swapping player
Also made /swap by name exclude the current player when searching
Diffstat (limited to 'source/game/StarUniverseClient.cpp')
-rw-r--r-- | source/game/StarUniverseClient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/game/StarUniverseClient.cpp b/source/game/StarUniverseClient.cpp index 90d5f07..2ff4631 100644 --- a/source/game/StarUniverseClient.cpp +++ b/source/game/StarUniverseClient.cpp @@ -537,7 +537,7 @@ bool UniverseClient::switchPlayer(size_t index) { } bool UniverseClient::switchPlayer(String const& name) { - if (auto uuid = m_playerStorage->playerUuidByName(name)) + if (auto uuid = m_playerStorage->playerUuidByName(name, mainPlayer()->uuid())) return switchPlayer(*uuid); else return false; |