mirror of
https://git.minecraftlegacy.com/backups/LCEMP.git
synced 2026-11-29 09:11:31 +00:00
LCEMP v1.1.0, bugfixes, multithreading server, local leaderboard, performance fixes, and more
This commit is contained in:
1 parent
fadeee4192
commit
7e7668c7fa
88 files changed
+4825
-634
No files matched your search
@@ -133,11 +133,14 @@ void PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
|
||||
|
||||
DWORD playerIndex = 0;
|
||||
{
|
||||
bool usedIndexes[32];
|
||||
ZeroMemory( &usedIndexes, 32 * sizeof(bool) );
|
||||
vector<char> usedIndexes(maxPlayers, 0);
|
||||
for(AUTO_VAR(it, players.begin()); it < players.end(); ++it)
|
||||
{
|
||||
usedIndexes[ (int)(*it)->getPlayerIndex() ] = true;
|
||||
int existingIndex = (int)(*it)->getPlayerIndex();
|
||||
if (existingIndex >= 0 && existingIndex < (int)usedIndexes.size())
|
||||
{
|
||||
usedIndexes[existingIndex] = 1;
|
||||
}
|
||||
}
|
||||
for(unsigned int i = 0; i < (unsigned int)maxPlayers; ++i)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user