Make bot names start at one

This commit is contained in:
Jip Fr 2023-01-21 00:10:30 +01:00
parent ab3defb424
commit d0bbf8f5f4
2 changed files with 3 additions and 6 deletions

View File

@ -462,10 +462,7 @@ void ClientLobby::update(int ticks)
#else #else
name = _("Bot"); name = _("Bot");
#endif #endif
if (i > 0) name += core::stringw(" ") + StringUtils::toWString(i + 1);
{
name += core::stringw(" ") + StringUtils::toWString(i);
}
} }
rest->encodeString(name). rest->encodeString(name).
addFloat(player->getDefaultKartColor()); addFloat(player->getDefaultKartColor());

View File

@ -3845,8 +3845,8 @@ void ServerLobby::handleUnencryptedConnection(std::shared_ptr<STKPeer> peer,
#else #else
core::stringw name = _("Bot"); core::stringw name = _("Bot");
#endif #endif
if (i > 0) name += core::stringw(" ") + StringUtils::toWString(i + 1);
name += core::stringw(" ") + StringUtils::toWString(i);
m_ai_profiles.push_back(std::make_shared<NetworkPlayerProfile> m_ai_profiles.push_back(std::make_shared<NetworkPlayerProfile>
(peer, name, peer->getHostId(), 0.0f, 0, HANDICAP_NONE, (peer, name, peer->getHostId(), 0.0f, 0, HANDICAP_NONE,
player_count + i, KART_TEAM_NONE, "")); player_count + i, KART_TEAM_NONE, ""));