more versatile disconnect reasons

This commit is contained in:
ac-stef
2017-06-27 15:15:21 +02:00
parent 1ca4ce54eb
commit 25deee5287
8 changed files with 58 additions and 23 deletions
+1 -3
View File
@@ -164,7 +164,7 @@ void disconnect(int onlyclean, int async)
{
if(!discmillis)
{
enet_peer_disconnect(curpeer, DISC_NONE);
enet_peer_disconnect(curpeer, DISC_BECAUSE);
enet_host_flush(clienthost);
discmillis = totalmillis;
}
@@ -629,8 +629,6 @@ void gets2c() // get updates from the server
case ENET_EVENT_TYPE_DISCONNECT:
{
extern const char *disc_reason(int reason);
if(event.data>=DISC_NUM) event.data = DISC_NONE;
if(event.peer==connpeer)
{
conoutf("\f3could not connect to server");