Update of /cvsroot/planeshift/planeshift/src/npcclient
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26791/src/npcclient
Modified Files:
networkmgr.cpp networkmgr.h
Log Message:
Fixed npcclient not sending a disconnect message on shutdown.
Index: networkmgr.cpp
===================================================================
RCS file: /cvsroot/planeshift/planeshift/src/npcclient/networkmgr.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** networkmgr.cpp 29 Nov 2004 16:46:44 -0000 1.46
--- networkmgr.cpp 29 Nov 2004 18:53:43 -0000 1.47
***************
*** 48,51 ****
--- 48,52 ----
msghandler = mh;
ready = false;
+ connected = false;
msghandler->Subscribe(this,MSGTYPENPCLIST);
msghandler->Subscribe(this,MSGTYPEMAPLIST);
***************
*** 110,113 ****
--- 111,115 ----
case MSGTYPEMAPLIST:
{
+ connected = true;
if (ReceiveMapList(me))
{
***************
*** 368,372 ****
// Special case to drop login failure reply from server immediately after we have already logged in.
! if (ready && disconnect.msgReason.CompareNoCase("Already Logged In."))
return;
--- 370,374 ----
// Special case to drop login failure reply from server immediately after we have already logged in.
! if (connected && disconnect.msgReason.CompareNoCase("Already Logged In."))
return;
***************
*** 374,378 ****
CPrintf(CON_DEBUG, "Reconnecting to %s..\n",host.GetData());
! ready = false;
// reconnect
--- 376,380 ----
CPrintf(CON_DEBUG, "Reconnecting to %s..\n",host.GetData());
! connected = ready = false;
// reconnect
Index: networkmgr.h
===================================================================
RCS file: /cvsroot/planeshift/planeshift/src/npcclient/networkmgr.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** networkmgr.h 30 Oct 2004 14:41:37 -0000 1.25
--- networkmgr.h 29 Nov 2004 18:53:45 -0000 1.26
***************
*** 37,40 ****
--- 37,41 ----
psNetConnection *connection;
bool ready;
+ bool connected;
psNPCCommandsMessage *outbound;
int cmd_count;
|