diff options
Diffstat (limited to 'src/d_net.c')
-rw-r--r-- | src/d_net.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/d_net.c b/src/d_net.c index 3557a1a3..7af0cd01 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: d_net.c 247 2006-01-02 20:14:29Z fraggle $ +// $Id: d_net.c 250 2006-01-02 21:04:10Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,11 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.15 2006/01/02 21:04:10 fraggle +// Create NET_SV_Shutdown function to shut down the server. Call it +// when quitting the game. Print the IP of the server correctly when +// connecting. +// // Revision 1.14 2006/01/02 20:14:29 fraggle // Add a "-client" option to test connecting to a local server. // @@ -80,7 +85,7 @@ //----------------------------------------------------------------------------- -static const char rcsid[] = "$Id: d_net.c 247 2006-01-02 20:14:29Z fraggle $"; +static const char rcsid[] = "$Id: d_net.c 250 2006-01-02 21:04:10Z fraggle $"; #include "d_main.h" @@ -94,6 +99,7 @@ static const char rcsid[] = "$Id: d_net.c 247 2006-01-02 20:14:29Z fraggle $"; #include "doomstat.h" #include "net_client.h" +#include "net_io.h" #include "net_server.h" #include "net_sdl.h" #include "net_loop.h" @@ -632,7 +638,6 @@ void D_CheckNetGame (void) NET_SV_Init(); addr = net_loop_client_module.ResolveAddress(""); - } if (M_CheckParm("-client") > 0) @@ -644,7 +649,7 @@ void D_CheckNetGame (void) { if (NET_CL_Connect(addr)) { - printf("connected to local server\n"); + printf("connected to %s\n", NET_AddrToString(addr)); } else { @@ -702,6 +707,7 @@ void D_QuitNetGame (void) if (debugfile) fclose (debugfile); + NET_SV_Shutdown(); NET_CL_Disconnect(); if (!netgame || !usergame || consoleplayer == -1 || demoplayback) |