X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=server.h;h=d83c908bf92725b67448d25ddc7676687ebfafac;hb=27b8e67dec8c8084ba38ed8201dc54ccd46fdb23;hp=0dfaf0342255f5ba4f567576026d81f17b85849e;hpb=8d7c6efa6bdbfecaa3dbcc39b68c4469d272dc6b;p=xonotic%2Fdarkplaces.git diff --git a/server.h b/server.h index 0dfaf034..d83c908b 100644 --- a/server.h +++ b/server.h @@ -112,12 +112,12 @@ typedef struct server_s char worldnamenoextension[MAX_QPATH]; // maps/%s struct model_s *worldmodel; // NULL terminated - // LordHavoc: precaches are now MAX_QPATH rather than a pointer + // LadyHavoc: precaches are now MAX_QPATH rather than a pointer // updated by SV_ModelIndex char model_precache[MAX_MODELS][MAX_QPATH]; struct model_s *models[MAX_MODELS]; // NULL terminated - // LordHavoc: precaches are now MAX_QPATH rather than a pointer + // LadyHavoc: precaches are now MAX_QPATH rather than a pointer // updated by SV_SoundIndex char sound_precache[MAX_SOUNDS][MAX_QPATH]; char lightstyles[MAX_LIGHTSTYLES][64]; @@ -132,7 +132,7 @@ typedef struct server_s unsigned char reliable_datagram_buf[NET_MAXMESSAGE]; sizebuf_t signon; - /// LordHavoc: increased signon message buffer from 8192 + /// LadyHavoc: increased signon message buffer from 8192 unsigned char signon_buf[NET_MAXMESSAGE]; /// connection flood blocking @@ -141,9 +141,8 @@ typedef struct server_s 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; @@ -215,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 +230,7 @@ typedef struct client_s /// ping_times[num_pings%NUM_PING_TIMES] int num_pings; #endif - /// LordHavoc: can be used for prediction or whatever... + /// LadyHavoc: can be used for prediction or whatever... float ping; /// this is used by sv_clmovement_minping code @@ -263,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; @@ -314,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; @@ -337,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 @@ -344,9 +344,9 @@ typedef struct client_s #define SOLID_BBOX 2 ///< touch on edge, block #define SOLID_SLIDEBOX 3 ///< touch on edge, but not an onground #define SOLID_BSP 4 ///< bsp clip, touch on edge, block -// LordHavoc: corpse code +// LadyHavoc: corpse code #define SOLID_CORPSE 5 ///< same as SOLID_BBOX, except it behaves as SOLID_NOT against SOLID_SLIDEBOX objects (players/monsters) -// LordHavoc: physics +// LadyHavoc: physics // VorteX: now these fields are deprecated, as geomtype is more flexible #define SOLID_PHYSICS_BOX 32 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity) #define SOLID_PHYSICS_SPHERE 33 ///< physics object (mins, maxs, mass, origin, axis_forward, axis_left, axis_up, velocity, spinvelocity) @@ -404,7 +404,7 @@ extern cvar_t scratch2; extern cvar_t scratch3; extern cvar_t scratch4; extern cvar_t skill; -extern cvar_t slowmo; +extern cvar_t host_timescale; extern cvar_t sv_accelerate; extern cvar_t sv_aim; extern cvar_t sv_airaccel_qw; @@ -577,12 +577,12 @@ 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); @@ -599,7 +599,7 @@ void SV_CheckVelocity (prvm_edict_t *ent); void SV_SetupVM(void); -const char *Host_TimingReport(char *buf, size_t buflen); ///< for output in Host_Status_f +const char *Host_TimingReport(char *buf, size_t buflen); ///< for output in SV_Status_f int SV_GetPitchSign(prvm_prog_t *prog, prvm_edict_t *ent); void SV_GetEntityMatrix(prvm_prog_t *prog, prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatrix); @@ -611,7 +611,17 @@ void SV_StopThread(void); void VM_CustomStats_Clear(void); void VM_SV_UpdateCustomStats(client_t *client, prvm_edict_t *ent, sizebuf_t *msg, int *stats); -void Host_Savegame_to(prvm_prog_t *prog, const char *name); + +void SV_InitOperatorCommands(void); + +void SV_Savegame_to(prvm_prog_t *prog, const char *name); +void SV_Savegame_f(cmd_state_t *cmd); +void SV_Loadgame_f(cmd_state_t *cmd); + +void SV_PreSpawn_f(cmd_state_t *cmd); +void SV_Spawn_f(cmd_state_t *cmd); +void SV_Begin_f(cmd_state_t *cmd); + void SV_SendServerinfo(client_t *client); #endif