diff options
author | Simon Howard | 2006-06-03 18:23:09 +0000 |
---|---|---|
committer | Simon Howard | 2006-06-03 18:23:09 +0000 |
commit | 26a2ba193ee3d93421f9fd50f25534031cd0f456 (patch) | |
tree | 6f6cb2a3a84a753d813fd8af8ff4b5f6582a5a63 /src | |
parent | ff67ee37fb68659245683b7d3a0f091a299d66f2 (diff) | |
download | chocolate-doom-26a2ba193ee3d93421f9fd50f25534031cd0f456.tar.gz chocolate-doom-26a2ba193ee3d93421f9fd50f25534031cd0f456.tar.bz2 chocolate-doom-26a2ba193ee3d93421f9fd50f25534031cd0f456.zip |
Stop sending data to the server when a connection drops. Print a message
to the console as well.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 557
Diffstat (limited to 'src')
-rw-r--r-- | src/net_client.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/net_client.c b/src/net_client.c index 4116e8fc..7956f73f 100644 --- a/src/net_client.c +++ b/src/net_client.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: net_client.c 475 2006-05-05 19:49:34Z fraggle $ +// $Id: net_client.c 557 2006-06-03 18:23:09Z fraggle $ // // Copyright(C) 2005 Simon Howard // @@ -308,6 +308,7 @@ static void NET_CL_Disconnected(void) // disconnected from server players[consoleplayer].message = "Disconnected from server"; + printf("Disconnected from server.\n"); for (i=0; i<MAXPLAYERS; ++i) { @@ -508,6 +509,14 @@ static void NET_CL_SendTics(int start, int end) net_packet_t *packet; int i; + if (!net_client_connected) + { + // Disconnected from server + + return; + } + + if (start < 0) start = 0; |