network: fix client despawn
parent
a2f76237f8
commit
e655331950
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue