]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - net_wins.c
colors for DrawQ_Mesh are now float rather than byte, and vertices are padded to...
[xonotic/darkplaces.git] / net_wins.c
index e01a6191ed0abfd7ce8c7bdfb41bf597ac51536f..4deb5c7cc6cf7cfb702ac51556271cbf6e7c9fd9 100644 (file)
@@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 #include "winquake.h"
 
-extern cvar_t hostname;
-
 #define MAXHOSTNAMELEN         256
 
 static int net_acceptsocket = -1;              // socket for fielding new connections
@@ -68,7 +66,7 @@ BOOL PASCAL FAR BlockingHook(void)
     MSG                msg;
     BOOL       ret;
  
-       if ((Sys_FloatTime() - blocktime) > 2.0)
+       if ((Sys_DoubleTime() - blocktime) > 2.0)
        {
                WSACancelBlockingCall();
                return false;
@@ -88,7 +86,7 @@ BOOL PASCAL FAR BlockingHook(void)
 } 
 
 
-void WINS_GetLocalAddress()
+void WINS_GetLocalAddress(void)
 {
        struct hostent  *local = NULL;
        char                    buff[MAXHOSTNAMELEN];
@@ -100,7 +98,7 @@ void WINS_GetLocalAddress()
        if (pgethostname(buff, MAXHOSTNAMELEN) == SOCKET_ERROR)
                return;
 
-       blocktime = Sys_FloatTime();
+       blocktime = Sys_DoubleTime();
        WSASetBlockingHook(BlockingHook);
        local = pgethostbyname(buff);
        WSAUnhookBlockingHook();
@@ -110,7 +108,7 @@ void WINS_GetLocalAddress()
        myAddr = *(int *)local->h_addr_list[0];
 
        addr = ntohl(myAddr);
-       sprintf(my_tcpip_address, "%d.%d.%d.%d", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
+       sprintf(my_tcpip_address, "%d.%d.%d.%d", (int) ((addr >> 24) & 0xff), (int) ((addr >> 16) & 0xff), (int) ((addr >> 8) & 0xff), (int) (addr & 0xff));
 }
 
 
@@ -394,7 +392,7 @@ int WINS_CheckNewConnections (void)
 
 //=============================================================================
 
-int WINS_Read (int socket, byte *buf, int len, struct qsockaddr *addr)
+int WINS_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int addrlen = sizeof (struct qsockaddr);
        int ret;
@@ -428,7 +426,7 @@ int WINS_MakeSocketBroadcastCapable (int socket)
 
 //=============================================================================
 
-int WINS_Broadcast (int socket, byte *buf, int len)
+int WINS_Broadcast (int socket, qbyte *buf, int len)
 {
        int ret;
 
@@ -450,7 +448,7 @@ int WINS_Broadcast (int socket, byte *buf, int len)
 
 //=============================================================================
 
-int WINS_Write (int socket, byte *buf, int len, struct qsockaddr *addr)
+int WINS_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int ret;
 
@@ -573,4 +571,3 @@ int WINS_SetSocketPort (struct qsockaddr *addr, int port)
        return 0;
 }
 
-//=============================================================================