update ConnectedBitmask when players disconnect

This commit is contained in:
Arisotura 2023-10-07 14:54:40 +02:00
parent 6c67ef7794
commit a5fb871e64
1 changed files with 4 additions and 0 deletions

View File

@ -865,6 +865,8 @@ void ProcessHostEvent(ENetEvent& event)
Player* player = (Player*)event.peer->data;
if (!player) break;
ConnectedBitmask &= ~(1 << player->ID);
int id = player->ID;
RemotePeers[id] = nullptr;
@ -983,6 +985,8 @@ void ProcessClientEvent(ENetEvent& event)
Player* player = (Player*)event.peer->data;
if (!player) break;
ConnectedBitmask &= ~(1 << player->ID);
int id = player->ID;
RemotePeers[id] = nullptr;
}