X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=server.h;h=0dfaf0342255f5ba4f567576026d81f17b85849e;hb=a0465ad2ee16719587b0b7a80d4c1c2f7df1ac0e;hp=321185634c1ade6bb2d0521794f0934ff097e416;hpb=8e4d41ab346185f7e878e4eaf97c47dc70321e9d;p=xonotic%2Fdarkplaces.git diff --git a/server.h b/server.h index 32118563..0dfaf034 100644 --- 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,7 +138,8 @@ 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; @@ -189,14 +191,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; @@ -231,7 +240,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]; @@ -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,6 +569,10 @@ 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);