[chocolate-doom] 19/79: Add a "-client" option to test connecting to a local server.
Jonathan Dowland
jmtd at moszumanska.debian.org
Mon Jan 30 15:07:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.
commit 27785be7f59555e7b80eb8693f4ed007b9867859
Author: Simon Howard <fraggle at gmail.com>
Date: Mon Jan 2 20:14:29 2006 +0000
Add a "-client" option to test connecting to a local server.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 247
---
src/d_net.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/src/d_net.c b/src/d_net.c
index 6f90b5d..3557a1a 100644
--- a/src/d_net.c
+++ b/src/d_net.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: d_net.c 241 2006-01-02 00:17:42Z fraggle $
+// $Id: d_net.c 247 2006-01-02 20:14:29Z fraggle $
//
// Copyright(C) 1993-1996 Id Software, Inc.
// Copyright(C) 2005 Simon Howard
@@ -22,6 +22,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.14 2006/01/02 20:14:29 fraggle
+// Add a "-client" option to test connecting to a local server.
+//
// Revision 1.13 2006/01/02 00:17:42 fraggle
// Encapsulate the event queue code properly. Add a D_PopEvent function
// to read a new event from the event queue.
@@ -77,10 +80,11 @@
//-----------------------------------------------------------------------------
-static const char rcsid[] = "$Id: d_net.c 241 2006-01-02 00:17:42Z fraggle $";
+static const char rcsid[] = "$Id: d_net.c 247 2006-01-02 20:14:29Z fraggle $";
#include "d_main.h"
+#include "m_argv.h"
#include "m_menu.h"
#include "i_system.h"
#include "i_video.h"
@@ -91,6 +95,8 @@ static const char rcsid[] = "$Id: d_net.c 241 2006-01-02 00:17:42Z fraggle $";
#include "net_client.h"
#include "net_server.h"
+#include "net_sdl.h"
+#include "net_loop.h"
#define NCMD_EXIT 0x80000000
#define NCMD_RETRANSMIT 0x40000000
@@ -608,11 +614,6 @@ void D_ArbitrateNetStart (void)
}
}
-#include "m_argv.h"
-#include "net_loop.h"
-#include "net_client.h"
-#include "net_server.h"
-
//
// D_CheckNetGame
// Works out player numbers among the net participants
@@ -621,19 +622,26 @@ extern int viewangleoffset;
void D_CheckNetGame (void)
{
+ net_addr_t *addr = NULL;
int i;
// temporary hack
if (M_CheckParm("-server") > 0)
{
- net_addr_t *addr;
NET_SV_Init();
addr = net_loop_client_module.ResolveAddress("");
- printf("address resolved: %p\n", addr);
+ }
+ if (M_CheckParm("-client") > 0)
+ {
+ addr = net_sdl_module.ResolveAddress("127.0.0.1");
+ }
+
+ if (addr != NULL)
+ {
if (NET_CL_Connect(addr))
{
printf("connected to local server\n");
@@ -643,7 +651,7 @@ void D_CheckNetGame (void)
printf("failed to connect\n");
}
}
-
+
for (i=0 ; i<MAXNETNODES ; i++)
{
nodeingame[i] = false;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git
More information about the Pkg-games-commits
mailing list