network: fix client despawn

isolation_bkp/dynres
Dominik Madarász 2022-07-31 12:30:41 +02:00
parent a2f76237f8
commit e655331950
1 changed files with 1 additions and 4 deletions

View File

@ -200,10 +200,7 @@ int32_t network_server_tick(void) {
case ENET_EVENT_TYPE_DISCONNECT: case ENET_EVENT_TYPE_DISCONNECT:
case ENET_EVENT_TYPE_DISCONNECT_TIMEOUT: { case ENET_EVENT_TYPE_DISCONNECT_TIMEOUT: {
zpl_printf("[INFO] A user %d disconnected.\n", event.peer->incomingPeerID); zpl_printf("[INFO] A user %d disconnected.\n", event.peer->incomingPeerID);
network_server_despawn_viewers(event.peer);
if (event.peer->data) {
network_server_despawn_viewers(event.peer);
}
} break; } break;
case ENET_EVENT_TYPE_RECEIVE: { case ENET_EVENT_TYPE_RECEIVE: {