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
name = _("Bot");
#endif
if (i > 0)
{
name += core::stringw(" ") + StringUtils::toWString(i);
}
name += core::stringw(" ") + StringUtils::toWString(i + 1);
}
rest->encodeString(name).
addFloat(player->getDefaultKartColor());

View File

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