diff -rc 971031/AIObj.cpp 971010r/AIObj.cpp
*** 971031/AIObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/AIObj.cpp	Fri Oct 31 22:11:45 1997
***************
*** 1,6 ****
  #include <math.h>
  #include <ctype.h>
! #include "h.h"
  #include "AIObj.h"
  
  extern char VERSION[];
--- 1,6 ----
  #include <math.h>
  #include <ctype.h>
! #include "H.h"
  #include "AIObj.h"
  
  extern char VERSION[];
diff -rc 971031/ConObj.cpp 971010r/ConObj.cpp
*** 971031/ConObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/ConObj.cpp	Fri Oct 31 22:11:45 1997
***************
*** 1,3 ****
--- 1,4 ----
+ #include "H.h"
  #include "ConObj.h"
  
  // *********************************************
***************
*** 71,82 ****
  // * is received.  
  // *
  // *********************************************
! void ConsoleObj::KeyEvent(void *Dummy) {
  	
  	char KeyData;
  
- 	Dummy = NULL;
- 
  #ifndef __unix__
  	KeyData = (char) _getche();
  #else
--- 72,81 ----
  // * is received.  
  // *
  // *********************************************
! void ConsoleObj::KeyEvent(void *UNUSED(Dummy)) {
  	
  	char KeyData;
  
  #ifndef __unix__
  	KeyData = (char) _getche();
  #else
***************
*** 97,103 ****
  	default:
  		InputBuffer[InputOffset++] = KeyData;
  	}
- 
  
  }
  
--- 96,101 ----
diff -rc 971031/DataObj.cpp 971010r/DataObj.cpp
*** 971031/DataObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/DataObj.cpp	Fri Oct 31 22:11:45 1997
***************
*** 1,5 ****
! #include "h.h"
! #include "h.h"
  #include "DataObj.h"
  
  void DataObj::SetServerName(char *Source){
--- 1,4 ----
! #include "H.h"
  #include "DataObj.h"
  
  void DataObj::SetServerName(char *Source){
diff -rc 971031/DataObj.h 971010r/DataObj.h
*** 971031/DataObj.h	Fri Oct 31 22:11:33 1997
--- 971010r/DataObj.h	Fri Oct 31 22:11:46 1997
***************
*** 85,88 ****
  
  
  #endif
- 
--- 85,87 ----
diff -rc 971031/EntObj.cpp 971010r/EntObj.cpp
*** 971031/EntObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/EntObj.cpp	Fri Oct 31 22:11:45 1997
***************
*** 1,3 ****
--- 1,4 ----
+ #include "H.h"
  #include "EntObj.h"
  
  void EntityObj::SaveOldValues() {
diff -rc 971031/EventObj.cpp 971010r/EventObj.cpp
*** 971031/EventObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/EventObj.cpp	Fri Oct 31 22:11:45 1997
***************
*** 1,6 ****
! #include "h.h"
! #include "h.h"
  #include "EventObj.h"
  EventTableObj::EventTableObj() {
  
  	int x;
--- 1,6 ----
! #include "H.h"
  #include "EventObj.h"
+ 
  EventTableObj::EventTableObj() {
  
  	int x;
***************
*** 98,161 ****
  int EventTableObj::EventLoop() {
  
  	int Result, x;
- 	unsigned int NumberFileDesc;
- 	fd_set Input;
- 	Boolean SPFlag, KeyboardHit;
- 
- 	SOCKET stdinfd = 0; // !!!!!!!!!!!!!!!! This could be wrong
- 
  
  	while(Execution) {
  
  #if !defined(DEBUG) && !defined(__unix__)
  		_CrtCheckMemory();	
  #endif
- 		KeyboardHit = False;
  
  		// Check for keyboard Data
! #ifdef __unix__
  		FD_ZERO(&Input);
  		FD_SET(stdinfd, &Input);
! 		timeval Timeout = RecvTimeout;
! 		Result = select(1, &Input, NULL, NULL, &Timeout);
! 		if(FD_ISSET(stdinfd, &Input))
! 			KeyboardHit = True;
  #else
  		if(_kbhit())
  			KeyboardHit = True;
  #endif
  
- 		// this is added so that the state cannot change during a loop
- 		SPFlag = SocketPolling;
- //		Print("EventCycle\n");
- 		FD_ZERO(&Input);
  		if(SPFlag) { // If socket polling turned on
  
- 			NumberFileDesc = 0;
  			for(x = 0; x <= LastVectorEntry; x++){
  				if(EventTable[x].Event == etRecvEvent) {
!                     FD_SET(EventTable[x].SocketID, &Input);
!                     if (EventTable[x].SocketID >= NumberFileDesc)
!                             NumberFileDesc = EventTable[x].SocketID + 1;
  				}
    			}
! 
! /*
! 			NumberFileDesc = 0;
! 			for(x = 0; x <= LastVectorEntry; x++){
! 				if(EventTable[x].Event == etRecvEvent) {
! 					NumberFileDesc++;
! 					FD_SET(EventTable[x].SocketID, &Input);
! 				}
! 			}
! */
! 
  			timeval Timeout = RecvTimeout;
  			Result = select(NumberFileDesc, &Input, NULL, NULL, &Timeout);
- //			if(Result == 0)
- //				Print("Timeout\n");
  		}
! 
  
  		for(x = 0; x <= LastVectorEntry; x++) {
  
--- 98,145 ----
  int EventTableObj::EventLoop() {
  
  	int Result, x;
  
  	while(Execution) {
  
  #if !defined(DEBUG) && !defined(__unix__)
  		_CrtCheckMemory();	
  #endif
  
  		// Check for keyboard Data
! 		int NumberFileDesc = 0;
! 		Boolean SPFlag = SocketPolling, KeyboardHit = False;
! 		SOCKET stdinfd = 0;
! 		fd_set Input;
! 
  		FD_ZERO(&Input);
+ #ifdef __unix__
  		FD_SET(stdinfd, &Input);
! 		NumberFileDesc = stdinfd + 1;
  #else
  		if(_kbhit())
  			KeyboardHit = True;
  #endif
  
  		if(SPFlag) { // If socket polling turned on
  
  			for(x = 0; x <= LastVectorEntry; x++){
  				if(EventTable[x].Event == etRecvEvent) {
!                     			FD_SET(EventTable[x].SocketID, &Input);
!                     			if (EventTable[x].SocketID >= NumberFileDesc)
!                             			NumberFileDesc = EventTable[x].SocketID + 1;
  				}
    			}
! 		}
! #ifdef __unix__
! 		Result = select(NumberFileDesc, &Input, NULL, NULL, NULL);
! 		if(FD_ISSET(stdinfd, &Input))
! 			KeyboardHit = True;
! #else
! 		if(SPFlag) {
  			timeval Timeout = RecvTimeout;
  			Result = select(NumberFileDesc, &Input, NULL, NULL, &Timeout);
  		}
! #endif
  
  		for(x = 0; x <= LastVectorEntry; x++) {
  
***************
*** 254,257 ****
  	SocketPolling = Mode;
  
  }
- 
--- 238,240 ----
diff -rc 971031/EventObj.h 971010r/EventObj.h
*** 971031/EventObj.h	Fri Oct 31 22:11:33 1997
--- 971010r/EventObj.h	Fri Oct 31 22:11:47 1997
***************
*** 53,66 ****
  public:
  	
  	// Override these in your object code and they will be called
! 	virtual void RecvEvent(void *Dummy){Dummy = NULL;};
! 	virtual void CycleEvent(void *Dummy){Dummy = NULL;};
! 	virtual void KeyEvent(void *Dummy){Dummy = NULL;};
! 	virtual void MessageEvent(ObjectEvent EventType, void *Dummy){EventType = oeConsoleParse; Dummy = NULL;};
  
  	// Special events. Called on Registration and Exit respectively
! 	virtual void InitEvent(void *Dummy){Dummy = NULL;};
! 	virtual void ExitEvent(void *Dummy){Dummy = NULL;};
  
  	int OwnerID;  // Your ID, to handler
  	char OwnerName[0x20];
--- 53,66 ----
  public:
  	
  	// Override these in your object code and they will be called
! 	virtual void RecvEvent(void *UNUSED(Dummy)){};
! 	virtual void CycleEvent(void *UNUSED(Dummy)){};
! 	virtual void KeyEvent(void *UNUSED(Dummy)){};
! 	virtual void MessageEvent(ObjectEvent EventType, void *UNUSED(Dummy)){EventType = oeConsoleParse;};
  
  	// Special events. Called on Registration and Exit respectively
! 	virtual void InitEvent(void *UNUSED(Dummy)){};
! 	virtual void ExitEvent(void *UNUSED(Dummy)){};
  
  	int OwnerID;  // Your ID, to handler
  	char OwnerName[0x20];
***************
*** 119,122 ****
  
  
  #endif
- 
--- 119,121 ----
diff -rc 971031/NavObj.cpp 971010r/NavObj.cpp
*** 971031/NavObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/NavObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,4 ****
! #include "h.h"
  #include "NavObj.h"
  
  int NavObj::Mapping() {
--- 1,4 ----
! #include "H.h"
  #include "NavObj.h"
  
  int NavObj::Mapping() {
diff -rc 971031/PcktObj.cpp 971010r/PcktObj.cpp
*** 971031/PcktObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/PcktObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,4 ****
! #include "h.h"
  #include "PcktObj.h"
  
  void PacketObj::Reset() {
--- 1,4 ----
! #include "H.h"
  #include "PcktObj.h"
  
  void PacketObj::Reset() {
diff -rc 971031/PlayrObj.cpp 971010r/PlayrObj.cpp
*** 971031/PlayrObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/PlayrObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,3 ****
--- 1,4 ----
+ #include "H.h"
  #include "PlayrObj.h"
  
  //************************************
***************
*** 182,184 ****
--- 183,186 ----
  }
  
  
+ 	
diff -rc 971031/ProxyObj.cpp 971010r/ProxyObj.cpp
*** 971031/ProxyObj.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/ProxyObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,4 ****
! #include "h.h"
  #include "ProxyObj.h"
  
  #ifdef __unix__
--- 1,4 ----
! #include "H.h"
  #include "ProxyObj.h"
  
  #ifdef __unix__
***************
*** 654,662 ****
  		ClientPacket.SaveAngle(Entity->Angle[2]);
  }
  
! void ProxyServerObj::CycleEvent(void *Dummy) {
  
- 	Dummy = NULL;
  	if(SocketMode == skIdle) { // Not waiting for response
  		SocketMode = skWaiting;  // go ahead and set flag
  								// Decode packet flips it back
--- 654,661 ----
  		ClientPacket.SaveAngle(Entity->Angle[2]);
  }
  
! void ProxyServerObj::CycleEvent(void *UNUSED(Dummy)) {
  
  	if(SocketMode == skIdle) { // Not waiting for response
  		SocketMode = skWaiting;  // go ahead and set flag
  								// Decode packet flips it back
***************
*** 850,858 ****
  // *
  // *********************
  
! void ProxyServerObj::ExitEvent(void *Dummy) {
! 
! 	Dummy = NULL;
  
  	if(ClientConnected) {
  		SendBroadcastMessage("Bot Terminating\n");
--- 849,855 ----
  // *
  // *********************
  
! void ProxyServerObj::ExitEvent(void *UNUSED(Dummy)) {
  
  	if(ClientConnected) {
  		SendBroadcastMessage("Bot Terminating\n");
diff -rc 971031/ProxyObj.h 971010r/ProxyObj.h
*** 971031/ProxyObj.h	Fri Oct 31 22:11:34 1997
--- 971010r/ProxyObj.h	Fri Oct 31 22:11:47 1997
***************
*** 111,114 ****
  
  
  #endif
- 
--- 111,113 ----
diff -rc 971031/QuakeBot.cpp 971010r/QuakeBot.cpp
*** 971031/QuakeBot.cpp	Fri Oct 31 22:11:32 1997
--- 971010r/QuakeBot.cpp	Fri Oct 31 22:11:46 1997
***************
*** 38,44 ****
  
  #include <ctype.h>
  
! #include "h.h"
  #include "QuakeBot.h"
  #include "SrvrObj.h"
  #include "ConObj.h"
--- 38,44 ----
  
  #include <ctype.h>
  
! #include "H.h"
  #include "QuakeBot.h"
  #include "SrvrObj.h"
  #include "ConObj.h"
***************
*** 87,93 ****
--- 87,95 ----
  	ServerObj QuakeServer(&EventTable, &Data);
  	
  	//  This be the smarts...
+ #if 0
  	AIObj Brains(&EventTable, &Data);
+ #endif
  	
  	// This interacts with the user
  	ConsoleObj Console(&EventTable, &Data);
***************
*** 150,158 ****
  	// This loop continues until an object calls EventTable->Exit();
  	// GOD, this works so much better!!!!!!!
  
- #ifdef __unix__
- 	system( "stty -icanon -icrnl" );
- #endif
  	ReturnVal = EventTable.EventLoop();  
  #ifndef __unix__
  	_CrtCheckMemory();
--- 152,157 ----
diff -rc 971031/ScktObj.cpp 971010r/ScktObj.cpp
*** 971031/ScktObj.cpp	Fri Oct 31 22:11:33 1997
--- 971010r/ScktObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,7 ****
--- 1,9 ----
  #ifdef __unix__
  	#include <ctype.h>
+ 	#include <errno.h>
  #endif
  
+ #include "H.h"
  #include "ScktObj.h"
  
  // Create a socket.  Store socket handle in SocketID
***************
*** 10,16 ****
  
  	SocketID = socket ( PF_INET, SOCK_DGRAM, 0 );
  	if(SocketID == INVALID_SOCKET) {
! 		printf("An error occured opening the socket\n");
  		EvaluateError();
  	}
  	
--- 12,18 ----
  
  	SocketID = socket ( PF_INET, SOCK_DGRAM, 0 );
  	if(SocketID == INVALID_SOCKET) {
! 		printf("An error occured opening the socket");
  		EvaluateError();
  	}
  	
***************
*** 41,47 ****
  	// Get the local hostname
  	if(HostName == NULL){ // Use local Host
  		if(gethostname ( LocalHost, HOSTNAME_LEN ) != 0) {
! 			printf("An error occured getting the local hostname\n");
  			EvaluateError();
  		}
  	} else
--- 43,49 ----
  	// Get the local hostname
  	if(HostName == NULL){ // Use local Host
  		if(gethostname ( LocalHost, HOSTNAME_LEN ) != 0) {
! 			printf("An error occured getting the local hostname");
  			EvaluateError();
  		}
  	} else
***************
*** 61,67 ****
  	sin.sin_port = htons((u_short)LocalPort);
  
  	if (bind(SocketID, (LPSOCKADDR)&sin, sizeof (sin)) != 0) {
! 		printf("bind() of Socket #%d failed\n", SocketID);
  		EvaluateError();
  	}
  	// This gets the local port if I didn't care
--- 63,69 ----
  	sin.sin_port = htons((u_short)LocalPort);
  
  	if (bind(SocketID, (LPSOCKADDR)&sin, sizeof (sin)) != 0) {
! 		printf("bind() of Socket #%d failed", SocketID);
  		EvaluateError();
  	}
  	// This gets the local port if I didn't care
***************
*** 70,76 ****
  	NameLength = sizeof(sin);
  
  	if(getsockname(SocketID, (LPSOCKADDR)&sin, &NameLength) != 0){
! 		printf("getsockname() of Socket #%d failed\n", SocketID);
  		EvaluateError();
  	}
  	 
--- 72,78 ----
  	NameLength = sizeof(sin);
  
  	if(getsockname(SocketID, (LPSOCKADDR)&sin, &NameLength) != 0){
! 		printf("getsockname() of Socket #%d failed", SocketID);
  		EvaluateError();
  	}
  	 
***************
*** 114,120 ****
  
  		DataLen = sizeof(SOCKADDR_IN);
  		if( ((Received = recvfrom( SocketID, InputBuffer, BUFLEN, 0, (LPSOCKADDR)&RecvAddress, &DataLen) )) == -1 ) {
! 			printf("recvfrom() failed\n");
  			EvaluateError();
  		}
  
--- 116,122 ----
  
  		DataLen = sizeof(SOCKADDR_IN);
  		if( ((Received = recvfrom( SocketID, InputBuffer, BUFLEN, 0, (LPSOCKADDR)&RecvAddress, &DataLen) )) == -1 ) {
! 			printf("recvfrom() failed");
  			EvaluateError();
  		}
  
***************
*** 126,134 ****
  }
  
  
  void SocketObj::CheckVersion() {  // Checks that winsock is ok and displays some stats
  
- #ifndef __unix__
  	WORD wVersionRequested;
  	WSADATA wsaData;
  	int err;
--- 128,136 ----
  }
  
  
+ #ifndef __unix__
  void SocketObj::CheckVersion() {  // Checks that winsock is ok and displays some stats
  
  	WORD wVersionRequested;
  	WSADATA wsaData;
  	int err;
***************
*** 140,146 ****
  	if ( err != 0 ) {
  		/* Tell the user that we couldn't find a useable */
  		/* winsock.dll.                                  */
! 		printf("Can't find winsock\n");
  
  		EvaluateStartupError(err);
  	}
--- 142,148 ----
  	if ( err != 0 ) {
  		/* Tell the user that we couldn't find a useable */
  		/* winsock.dll.                                  */
! 		printf("Can't find winsock");
  
  		EvaluateStartupError(err);
  	}
***************
*** 184,192 ****
  
  	/* Since we only support 1.1, set both wVersion and  */
  	/* wHighVersion to 1.1.                              */
- #endif
  
  }
  
  // *****************************************
  // *
--- 186,194 ----
  
  	/* Since we only support 1.1, set both wVersion and  */
  	/* wHighVersion to 1.1.                              */
  
  }
+ #endif
  
  // *****************************************
  // *
***************
*** 255,369 ****
  	SendAddress.sin_port = htons((u_short)RemotePort);
  	
  	if( ( sendto( SocketID, Data, DataLen, 0, (LPSOCKADDR)&SendAddress, sizeof(SOCKADDR_IN)) ) == -1 ) {
! 		printf("sendto() failed\n");
  		EvaluateError();
  	}
  }
  
  void SocketObj::EvaluateError() {  // evaluate winsock errors
- 
- #ifndef __unix__
  	
  	int erno;
  
  	erno = WSAGetLastError ();
  	switch(erno) {
  	case WSANOTINITIALISED:
! 			printf("WSANOTINITIALISED: A successful WSAStartup() must occur before using this API.\n");
  			break;
  	case WSAENETDOWN:
! 			printf("WSAENETDOWN: Network subsystem has failed.\n");
  			break;
  	case WSAEADDRINUSE:
! 			printf("WSAEADDRINUSE: The specified address is already in use.\n");
  			break;
  	case WSAEINTR:
! 			printf("WSAEINTR: The (blocking) call was canceled via WSACancelBlockingCall()\n");
  			break;
  	case WSAEINPROGRESS:
! 			printf("WSAEINPROGRESS: A blocking Windows Sockets call is in progress.\n");
  			break;
  	case WSAEADDRNOTAVAIL:
! 			printf("WSAEADDRNOTAVAIL: The specified address is not available from the local machine.\n");
  			break;
  	case WSAEAFNOSUPPORT:
! 			printf("WSAEAFNOSUPPORT: Addresses in the specified family cannot be used with this socket.\n");
  			break;
  	case WSAECONNREFUSED:
! 			printf("WSAECONNREFUSED: The attempt to connect was forcefully rejected.\n");
  			break;
  //	case WSAEDESTADDREQ:
! //			printf("A destination address is required.\n");
  //			break;
  	case WSAEFAULT:
! 			printf("WSAEFAULT: The namelen argument is incorrect.\n");
  			break;
  	case WSAEINVAL:
! 			printf("WSAEINVAL: The socket is already bound to an address.\n");
  			break;
  	case WSAEISCONN:
! 			printf("WSAEISCONN: The socket is already connected.\n");
  			break;
  	case WSAEMFILE:
! 			printf("WSAEMFILE: No more file descriptors are available.\n");
  			break;
  	case WSAENETUNREACH:
! 			printf("WSAENETUNREACH: The network can't be reached from this host at this time.\n");
  			break;
  	case WSAENOBUFS:
! 			printf("WSAENOBUFS: No buffer space is available.  The socket cannot be connected.\n");
  			break;
  	case WSAENOTSOCK:
! 			printf("WSAENOTSOCK: The descriptor is not a socket.\n");
  			break;
  	case WSAETIMEDOUT:
! 			printf("WSAETIMEDOUT: Attempt to connect timed out without establishing a connection\n");
  			break;
  	case WSAEWOULDBLOCK:
! 			printf("WSAEWOULDBLOCK: The socket is marked as non-blocking and the connection cannot be completed manually.\n");
  			break;
  
  	case WSAEPROTONOSUPPORT:
! 			printf("WSAEPROTONOSUPPORT: The specified protocol is not supported.\n");
  			break;
  	case WSAEPROTOTYPE:
! 			printf("WSAEPROTOTYPE: The specified protocol is the wrong type for this socket.\n");
  			break;
  	case WSAESOCKTNOSUPPORT:
! 			printf("WSAESOCKTNOSUPPORT: The specified socket type is not supported in this address family.\n");
  			break;
  	case WSAEMSGSIZE:
! 			printf("WSAEMSGSIZE: The message was too large to fit int he buffer provided and was truncated\n");
  			break;
  	default:
! 			printf("No Error is defined for this exception (%d)\n",erno );
  	}
- 
  #endif
! 	
  	exit(-1);
  }
  
- void SocketObj::EvaluateStartupError(int erno) {
- 
  #ifndef __unix__
  
  	switch(erno) {
  	case WSASYSNOTREADY:
! 			printf("Indicates that the underlying network subsystem is not ready for network communication.\n");
  			break;
  	case WSAVERNOTSUPPORTED:
! 			printf("The version of Windows Sockets API support requested is not provided by this particular Windows Sockets implementation.\n");
  			break;
  	case WSAEINVAL:
! 			printf("The Windows Sockets version specified by the application is not supported by this DLL.\n");
  			break;
  	}
  
- #endif
- 
  	exit(-1);
  }
  
  // ********************************************
  // *
--- 257,369 ----
  	SendAddress.sin_port = htons((u_short)RemotePort);
  	
  	if( ( sendto( SocketID, Data, DataLen, 0, (LPSOCKADDR)&SendAddress, sizeof(SOCKADDR_IN)) ) == -1 ) {
! 		printf("sendto() failed");
  		EvaluateError();
  	}
  }
  
  void SocketObj::EvaluateError() {  // evaluate winsock errors
  	
+ #ifdef __unix__
+ 	printf(": %s\n", sys_errlist[errno]);
+ #else
  	int erno;
  
  	erno = WSAGetLastError ();
  	switch(erno) {
  	case WSANOTINITIALISED:
! 			printf("\nWSANOTINITIALISED: A successful WSAStartup() must occur before using this API.\n");
  			break;
  	case WSAENETDOWN:
! 			printf("\nWSAENETDOWN: Network subsystem has failed.\n");
  			break;
  	case WSAEADDRINUSE:
! 			printf("\nWSAEADDRINUSE: The specified address is already in use.\n");
  			break;
  	case WSAEINTR:
! 			printf("\nWSAEINTR: The (blocking) call was canceled via WSACancelBlockingCall()\n");
  			break;
  	case WSAEINPROGRESS:
! 			printf("\nWSAEINPROGRESS: A blocking Windows Sockets call is in progress.\n");
  			break;
  	case WSAEADDRNOTAVAIL:
! 			printf("\nWSAEADDRNOTAVAIL: The specified address is not available from the local machine.\n");
  			break;
  	case WSAEAFNOSUPPORT:
! 			printf("\nWSAEAFNOSUPPORT: Addresses in the specified family cannot be used with this socket.\n");
  			break;
  	case WSAECONNREFUSED:
! 			printf("\nWSAECONNREFUSED: The attempt to connect was forcefully rejected.\n");
  			break;
  //	case WSAEDESTADDREQ:
! //			printf("\nA destination address is required.\n");
  //			break;
  	case WSAEFAULT:
! 			printf("\nWSAEFAULT: The namelen argument is incorrect.\n");
  			break;
  	case WSAEINVAL:
! 			printf("\nWSAEINVAL: The socket is already bound to an address.\n");
  			break;
  	case WSAEISCONN:
! 			printf("\nWSAEISCONN: The socket is already connected.\n");
  			break;
  	case WSAEMFILE:
! 			printf("\nWSAEMFILE: No more file descriptors are available.\n");
  			break;
  	case WSAENETUNREACH:
! 			printf("\nWSAENETUNREACH: The network can't be reached from this host at this time.\n");
  			break;
  	case WSAENOBUFS:
! 			printf("\nWSAENOBUFS: No buffer space is available.  The socket cannot be connected.\n");
  			break;
  	case WSAENOTSOCK:
! 			printf("\nWSAENOTSOCK: The descriptor is not a socket.\n");
  			break;
  	case WSAETIMEDOUT:
! 			printf("\nWSAETIMEDOUT: Attempt to connect timed out without establishing a connection\n");
  			break;
  	case WSAEWOULDBLOCK:
! 			printf("\nWSAEWOULDBLOCK: The socket is marked as non-blocking and the connection cannot be completed manually.\n");
  			break;
  
  	case WSAEPROTONOSUPPORT:
! 			printf("\nWSAEPROTONOSUPPORT: The specified protocol is not supported.\n");
  			break;
  	case WSAEPROTOTYPE:
! 			printf("\nWSAEPROTOTYPE: The specified protocol is the wrong type for this socket.\n");
  			break;
  	case WSAESOCKTNOSUPPORT:
! 			printf("\nWSAESOCKTNOSUPPORT: The specified socket type is not supported in this address family.\n");
  			break;
  	case WSAEMSGSIZE:
! 			printf("\nWSAEMSGSIZE: The message was too large to fit int he buffer provided and was truncated\n");
  			break;
  	default:
! 			printf("\nNo Error is defined for this exception (%d)\n",erno );
  	}
  #endif
! 
  	exit(-1);
  }
  
  #ifndef __unix__
+ void SocketObj::EvaluateStartupError(int erno) {
  
  	switch(erno) {
  	case WSASYSNOTREADY:
! 			printf("\nIndicates that the underlying network subsystem is not ready for network communication.\n");
  			break;
  	case WSAVERNOTSUPPORTED:
! 			printf("\nThe version of Windows Sockets API support requested is not provided by this particular Windows Sockets implementation.\n");
  			break;
  	case WSAEINVAL:
! 			printf("\nThe Windows Sockets version specified by the application is not supported by this DLL.\n");
  			break;
  	}
  
  	exit(-1);
  }
+ #endif
  
  // ********************************************
  // *
diff -rc 971031/ScktObj.h 971010r/ScktObj.h
*** 971031/ScktObj.h	Fri Oct 31 22:11:34 1997
--- 971010r/ScktObj.h	Fri Oct 31 22:11:47 1997
***************
*** 76,82 ****
--- 76,84 ----
  	SocketObj() {
  		LocalPort = 0;
  		RemotePort = 0;
+ #ifndef __unix__
  		CheckVersion();				// Check winsock version
+ #endif
  		MakeSocket();				// create a socket
  	}
  	
***************
*** 107,115 ****
--- 109,121 ----
  	SOCKET SocketID;					// System socket for object
  										// All functions reference this	long RecvTimeout;
  	timeval RecvTimeout;
+ #ifndef __unix__
  	void CheckVersion();		
+ #endif
  	void MakeSocket();
+ #ifndef __unix__
  	void EvaluateStartupError(int);		// error routines
+ #endif
  	void EvaluateError();
  	void InitSocket(char *Hostname);
  	void InitSocket() {
***************
*** 129,132 ****
  
  
  #endif
- 
--- 135,137 ----
diff -rc 971031/SrvrObj.cpp 971010r/SrvrObj.cpp
*** 971031/SrvrObj.cpp	Fri Oct 31 22:11:33 1997
--- 971010r/SrvrObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,3 ****
--- 1,4 ----
+ #include "H.h"
  #include "SrvrObj.h"
  
  // ***********************************************************
***************
*** 586,593 ****
  				for(i=0; i<3; i++)
  					Velocity[i] = (float) ServerPacket.ReadChar() * (float)0.0625;
  			
! 				int Color = ServerPacket.ReadByte();
! 				int Count = ServerPacket.ReadByte();
  			}
  #ifdef DECODE
  			EventTable->Print("Command: Particle\n");
--- 587,594 ----
  				for(i=0; i<3; i++)
  					Velocity[i] = (float) ServerPacket.ReadChar() * (float)0.0625;
  			
! 				int Color __attribute__((unused)) = ServerPacket.ReadByte();
! 				int Count __attribute__((unused)) = ServerPacket.ReadByte();
  			}
  #ifdef DECODE
  			EventTable->Print("Command: Particle\n");
***************
*** 680,688 ****
  
  				for(i = 0; i<3; i++)
  					Origin[i] = ServerPacket.ReadCoord();
! 				int SoundNum = ServerPacket.ReadByte();
! 				float Volume = (float)ServerPacket.ReadByte() / (float)255.0;
! 				float Attenuation = (float)ServerPacket.ReadByte() / (float)64.0;
  			}
  #ifdef DECODE
  			EventTable->Print("Command: Spawn Static Sound\n");
--- 681,689 ----
  
  				for(i = 0; i<3; i++)
  					Origin[i] = ServerPacket.ReadCoord();
! 				int SoundNum __attribute__((unused)) = ServerPacket.ReadByte();
! 				float Volume __attribute__((unused)) = (float)ServerPacket.ReadByte() / (float)255.0;
! 				float Attenuation __attribute__((unused)) = (float)ServerPacket.ReadByte() / (float)64.0;
  			}
  #ifdef DECODE
  			EventTable->Print("Command: Spawn Static Sound\n");
***************
*** 829,840 ****
  	long EntityChannel;
  	int Entity;
  	int BitMask = ServerPacket.ReadByte();
! 	float Volume = BitMask & 0x01 ? (float) ServerPacket.ReadByte()/ (float)255.0 : (float)1.0;
! 	float Attenuation = BitMask & 0x02 ? (float) ServerPacket.ReadByte()/ (float)64.0 : (float)1.0;
  	EntityChannel = ServerPacket.ReadShort();
! 	int Channel = EntityChannel & 0x07;
  	Entity = (EntityChannel >> 3) & 0x1fff;
! 	int SoundNumber = ServerPacket.ReadByte();
  	for(int i =0; i<3;i++)
  		Origin[i] = ServerPacket.ReadCoord();
  
--- 830,841 ----
  	long EntityChannel;
  	int Entity;
  	int BitMask = ServerPacket.ReadByte();
! 	float Volume __attribute__((unused)) = BitMask & 0x01 ? (float) ServerPacket.ReadByte()/ (float)255.0 : (float)1.0;
! 	float Attenuation __attribute__((unused)) = BitMask & 0x02 ? (float) ServerPacket.ReadByte()/ (float)64.0 : (float)1.0;
  	EntityChannel = ServerPacket.ReadShort();
! 	int Channel __attribute__((unused)) = EntityChannel & 0x07;
  	Entity = (EntityChannel >> 3) & 0x1fff;
! 	int SoundNumber __attribute__((unused)) = ServerPacket.ReadByte();
  	for(int i =0; i<3;i++)
  		Origin[i] = ServerPacket.ReadCoord();
  
***************
*** 1351,1360 ****
  // *
  // ***************************************************************
  
! void ServerObj::CycleEvent(void *Dummy) {
  
- 	Dummy = NULL;
- 	
  	if(SocketMode == skIdle) { // Not waiting for response
  		SocketMode = skWaiting;  // go ahead and set flag
  								// Decode packet flips it back
--- 1352,1359 ----
  // *
  // ***************************************************************
  
! void ServerObj::CycleEvent(void *UNUSED(Dummy)) {
  
  	if(SocketMode == skIdle) { // Not waiting for response
  		SocketMode = skWaiting;  // go ahead and set flag
  								// Decode packet flips it back
***************
*** 1529,1538 ****
  // *
  // *********************
  
! void ServerObj::ExitEvent(void *Dummy) {
  
- 	Dummy = NULL;
- 	
  	if(Connected) {
  		SendBroadcastMessage("Terminating");
  		SendGoodbye();
--- 1528,1535 ----
  // *
  // *********************
  
! void ServerObj::ExitEvent(void *UNUSED(Dummy)) {
  
  	if(Connected) {
  		SendBroadcastMessage("Terminating");
  		SendGoodbye();
***************
*** 1571,1580 ****
  // * Called by the presence of data on a socket
  // *
  // *********************
! void ServerObj::RecvEvent(void *Dummy) {
  
- 	Dummy = NULL;
- 	
  //	EventTable->Print("Receiving Data\n");
  	ServerPacket.GetMessage();
  	DecodePacket();
--- 1568,1575 ----
  // * Called by the presence of data on a socket
  // *
  // *********************
! void ServerObj::RecvEvent(void *UNUSED(Dummy)) {
  
  //	EventTable->Print("Receiving Data\n");
  	ServerPacket.GetMessage();
  	DecodePacket();
***************
*** 1585,1588 ****
  
  
  }
- 
--- 1580,1582 ----
diff -rc 971031/SrvrObj.h 971010r/SrvrObj.h
*** 971031/SrvrObj.h	Fri Oct 31 22:11:34 1997
--- 971010r/SrvrObj.h	Fri Oct 31 22:11:47 1997
***************
*** 115,118 ****
  
  
  #endif
- 
--- 115,117 ----
diff -rc 971031/WayObj.cpp 971010r/WayObj.cpp
*** 971031/WayObj.cpp	Fri Oct 31 22:11:33 1997
--- 971010r/WayObj.cpp	Fri Oct 31 22:11:46 1997
***************
*** 1,4 ****
! #include "h.h"
  #include "WayObj.h"
  
  WaypointObj::WaypointObj(float NewX, float NewY, float NewZ) {
--- 1,4 ----
! #include "H.h"
  #include "WayObj.h"
  
  WaypointObj::WaypointObj(float NewX, float NewY, float NewZ) {
