mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
update ConnectedBitmask when players disconnect
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user