DP code cleanup, stage one - all headers that can be protected by ifdef
[xonotic/darkplaces.git] / server.h
index 175cd41..88813ef 100644 (file)
--- a/server.h
+++ b/server.h
@@ -19,6 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 // server.h
 
+#ifndef SERVER_H
+#define SERVER_H
+
 typedef struct
 {
        int                     maxclients;
@@ -42,10 +45,10 @@ typedef struct
        double          time;
 
        double          frametime;
-       
+
        int                     lastcheck;                      // used by PF_checkclient
        double          lastchecktime;
-       
+
        char            name[64];                       // map name
        char            modelname[64];          // maps/<name>.bsp, for model_precache[0]
        struct model_s  *worldmodel;
@@ -61,13 +64,13 @@ typedef struct
        server_state_t  state;                  // some actions are only valid during load
 
        sizebuf_t       datagram;
-       byte            datagram_buf[MAX_DATAGRAM];
+       qbyte           datagram_buf[MAX_DATAGRAM];
 
        sizebuf_t       reliable_datagram;      // copied to all clients at end of frame
-       byte            reliable_datagram_buf[MAX_DATAGRAM];
+       qbyte           reliable_datagram_buf[MAX_DATAGRAM];
 
        sizebuf_t       signon;
-       byte            signon_buf[32768]; // LordHavoc: increased signon message buffer from 8192 to 32768
+       qbyte           signon_buf[32768]; // LordHavoc: increased signon message buffer from 8192 to 32768
 } server_t;
 
 
@@ -81,9 +84,11 @@ typedef struct client_s
        qboolean                dropasap;                       // has been told to go to another level
        qboolean                sendsignon;                     // only valid before spawned
 
+#ifndef NOROUTINGFIX
        // LordHavoc: to make netquake protocol get through NAT routers, have to wait for client to ack
        qboolean                waitingforconnect;      // waiting for connect from client (stage 1)
        qboolean                sendserverinfo;         // send server info in next datagram (stage 2)
+#endif
 
        double                  last_message;           // reliable messages must be sent
                                                                                // periodically
@@ -95,7 +100,7 @@ typedef struct client_s
 
        sizebuf_t               message;                        // can be added to at any time,
                                                                                // copied and clear once per frame
-       byte                    msgbuf[MAX_MSGLEN];
+       qbyte                   msgbuf[MAX_MSGLEN];
        edict_t                 *edict;                         // EDICT_NUM(clientnum+1)
        char                    name[32];                       // for printing to other people
        int                             colors;
@@ -164,7 +169,6 @@ typedef struct client_s
 // edict->flags
 #define        FL_FLY                                  1
 #define        FL_SWIM                                 2
-//#define      FL_GLIMPSE                              4
 #define        FL_CONVEYOR                             4
 #define        FL_CLIENT                               8
 #define        FL_INWATER                              16
@@ -263,3 +267,6 @@ void SV_CheckForNewClients (void);
 void SV_RunClients (void);
 void SV_SaveSpawnparms (void);
 void SV_SpawnServer (char *server);
+
+#endif
+