]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - server.h
Add GL_ExtensionSupported in vid_null.c because vid_shared.c relies on
[xonotic/darkplaces.git] / server.h
index 321185634c1ade6bb2d0521794f0934ff097e416..bd35e7bdbb29ae6bc486ca48ccae23a953fdcc23 100644 (file)
--- a/server.h
+++ b/server.h
@@ -66,12 +66,13 @@ typedef struct server_static_s
 typedef enum server_state_e {ss_loading, ss_active} server_state_t;
 
 #define MAX_CONNECTFLOODADDRESSES 16
-typedef struct server_connectfloodaddress_s
+#define MAX_GETSTATUSFLOODADDRESSES 128
+typedef struct server_floodaddress_s
 {
        double lasttime;
        lhnetaddress_t address;
 }
-server_connectfloodaddress_t;
+server_floodaddress_t;
 
 typedef struct server_s
 {
@@ -137,11 +138,11 @@ typedef struct server_s
        /// connection flood blocking
        /// note this is in server_t rather than server_static_t so that it is
        /// reset on each map command (such as New Game in singleplayer)
-       server_connectfloodaddress_t connectfloodaddresses[MAX_CONNECTFLOODADDRESSES];
+       server_floodaddress_t connectfloodaddresses[MAX_CONNECTFLOODADDRESSES];
+       server_floodaddress_t getstatusfloodaddresses[MAX_GETSTATUSFLOODADDRESSES];
 
-#define SV_MAX_PARTICLEEFFECTNAME 256
        qboolean particleeffectnamesloaded;
-       char particleeffectname[SV_MAX_PARTICLEEFFECTNAME][MAX_QPATH];
+       char particleeffectname[MAX_PARTICLEEFFECTNAME][MAX_QPATH];
 
        int writeentitiestoclient_stats_culled_pvs;
        int writeentitiestoclient_stats_culled_trace;
@@ -189,14 +190,21 @@ typedef struct client_s
        qboolean active;
        /// false = don't do ClientDisconnect on drop
        qboolean clientconnectcalled;
-       /// false = don't send datagrams
+       /// false = don't allow spawn
+       qboolean prespawned;
+       /// false = don't allow begin
        qboolean spawned;
+       /// false = don't send datagrams
+       qboolean begun;
        /// 1 = send svc_serverinfo and advance to 2, 2 doesn't send, then advances to 0 (allowing unlimited sending) when prespawn is received
        int sendsignon;
 
        /// requested rate in bytes per second
        int rate;
 
+       /// temporarily exceed rate by this amount of bytes
+       int rate_burstsize;
+
        /// realtime this client connected
        double connecttime;
 
@@ -206,9 +214,9 @@ typedef struct client_s
        /// communications handle
        netconn_t *netconnection;
 
-       int movesequence;
+       unsigned int movesequence;
        signed char movement_count[NETGRAPH_PACKETS];
-       int movement_highestsequence_seen; // not the same as movesequence if prediction is off
+       unsigned int movement_highestsequence_seen; // not the same as movesequence if prediction is off
        /// movement
        usercmd_t cmd;
        /// intended motion calced from cmd
@@ -231,7 +239,7 @@ typedef struct client_s
        float clmovement_inputtimeout;
 
 /// spawn parms are carried from level to level
-       float spawn_parms[NUM_SPAWN_PARMS];
+       prvm_vec_t spawn_parms[NUM_SPAWN_PARMS];
 
        // properties that are sent across the network only when changed
        char name[MAX_SCOREBOARDNAME], old_name[MAX_SCOREBOARDNAME];
@@ -254,7 +262,6 @@ typedef struct client_s
        unsigned int csqcentitysendflags[MAX_EDICTS];
 
 #define NUM_CSQCENTITYDB_FRAMES 256
-       unsigned char csqcentityglobalhistory[MAX_EDICTS]; // set to 1 if the entity was ever csqc networked to the client, and never reset back to 0
        csqcentityframedb_t csqcentityframehistory[NUM_CSQCENTITYDB_FRAMES];
        int csqcentityframehistory_next;
        int csqcentityframe_lastreset;
@@ -305,7 +312,7 @@ typedef struct client_s
 
        // last sent move sequence
        // if the move sequence changed, an empty entity frame is sent
-       int lastmovesequence;
+       unsigned int lastmovesequence;
 } client_t;
 
 
@@ -328,6 +335,8 @@ typedef struct client_s
 #define MOVETYPE_FAKEPUSH              13              ///< tenebrae's push that doesn't push
 #define MOVETYPE_PHYSICS               32              ///< indicates this object is physics controlled
 #define MOVETYPE_FLY_WORLDONLY         33              ///< like MOVETYPE_FLY, but uses MOVE_WORLDONLY for all its traces; objects of this movetype better be SOLID_NOT or SOLID_TRIGGER please, or else...
+#define MOVETYPE_USER_FIRST            128             ///< user defined movetypes
+#define MOVETYPE_USER_LAST             191
 
 // edict->solid values
 #define        SOLID_NOT                               0               ///< no interaction with other objects
@@ -456,7 +465,6 @@ extern cvar_t sv_gameplayfix_nogravityonground;
 extern cvar_t sv_gameplayfix_setmodelrealbox;
 extern cvar_t sv_gameplayfix_slidemoveprojectiles;
 extern cvar_t sv_gameplayfix_stepdown;
-extern cvar_t sv_gameplayfix_stepwhilejumping;
 extern cvar_t sv_gameplayfix_stepmultipletimes;
 extern cvar_t sv_gameplayfix_nostepmoveonsteepslopes;
 extern cvar_t sv_gameplayfix_swiminbmodels;
@@ -561,16 +569,20 @@ void SV_LinkEdict_TouchAreaGrid_Call(prvm_edict_t *touch, prvm_edict_t *ent); //
  * returns true if it found a better place
  */
 qboolean SV_UnstickEntity (prvm_edict_t *ent);
+/*! move an entity that is stuck out of the surface it is stuck in (can move large amounts)
+ * returns true if it found a better place
+ */
+qboolean SV_NudgeOutOfSolid(prvm_edict_t *ent);
 
 /// calculates hitsupercontentsmask for a generic qc entity
 int SV_GenericHitSuperContentsMask(const prvm_edict_t *edict);
 /// traces a box move against worldmodel and all entities in the specified area
-trace_t SV_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask);
-trace_t SV_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask);
-trace_t SV_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int hitsupercontentsmask);
+trace_t SV_TraceBox(const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend);
+trace_t SV_TraceLine(const vec3_t start, const vec3_t end, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask, float extend);
+trace_t SV_TracePoint(const vec3_t start, int type, prvm_edict_t *passedict, int hitsupercontentsmask, int skipsupercontentsmask, int skipmaterialflagsmask);
 int SV_EntitiesInBox(const vec3_t mins, const vec3_t maxs, int maxedicts, prvm_edict_t **resultedicts);
 
-qboolean SV_CanSeeBox(int numsamples, vec_t enlarge, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs);
+qboolean SV_CanSeeBox(int numsamples, vec_t eyejitter, vec_t enlarge, vec_t entboxexpand, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs);
 
 int SV_PointSuperContents(const vec3_t point);