update ConnectedBitmask when players disconnect
This commit is contained in:
parent
6c67ef7794
commit
a5fb871e64
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue