X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=server.h;h=5ae7befde0f911157127168a7305f1f8d6db6a0d;hb=264666d8dd5ef7eec1acaafb211d7516e2eadae1;hp=b3ab98a280d49ccae4931de91061ba53aaaf3250;hpb=0a05c446ba26bd5897645a37ceec8646c5bc93eb;p=xonotic%2Fdarkplaces.git diff --git a/server.h b/server.h index b3ab98a2..5ae7befd 100644 --- a/server.h +++ b/server.h @@ -179,9 +179,6 @@ typedef struct csqcentityframedb_s int sendflags[NUM_CSQCENTITIES_PER_FRAME]; } csqcentityframedb_t; -// if defined this does ping smoothing, otherwise it does not -//#define NUM_PING_TIMES 16 - #define NUM_SPAWN_PARMS 16 typedef struct client_s @@ -225,11 +222,6 @@ typedef struct client_s /// PRVM_EDICT_NUM(clientnum+1) prvm_edict_t *edict; -#ifdef NUM_PING_TIMES - float ping_times[NUM_PING_TIMES]; - /// ping_times[num_pings%NUM_PING_TIMES] - int num_pings; -#endif /// LadyHavoc: can be used for prediction or whatever... float ping; @@ -512,6 +504,10 @@ extern client_t *host_client; //=========================================================== void SV_Init (void); +double SV_Frame(double time); +void SV_Shutdown(void); + +int SV_IsLocalServer(void); void SV_StartParticle (vec3_t org, vec3_t dir, int color, int count); void SV_StartEffect (vec3_t org, int modelindex, int startframe, int framecount, int framerate); @@ -519,7 +515,9 @@ void SV_StartSound (prvm_edict_t *entity, int channel, const char *sample, int v void SV_StartPointSound (vec3_t origin, const char *sample, int volume, float attenuation, float speed); void SV_ConnectClient (int clientnum, netconn_t *netconnection); -void SV_DropClient (qbool crash); +void SV_DropClient (qbool leaving, const char *reason, ... ); + +void SV_ClientCommands(const char *fmt, ...) DP_FUNC_PRINTF(1); void SV_SendClientMessages(void); @@ -534,14 +532,14 @@ int SV_SoundIndex(const char *s, int precachemode); int SV_ParticleEffectIndex(const char *name); -dp_model_t *SV_GetModelByIndex(int modelindex); -dp_model_t *SV_GetModelFromEdict(prvm_edict_t *ed); +model_t *SV_GetModelByIndex(int modelindex); +model_t *SV_GetModelFromEdict(prvm_edict_t *ed); void SV_SetIdealPitch (void); void SV_AddUpdates (void); -void SV_ClientThink (void); +void SV_PlayerPhysics (void); void SV_ClientPrint(const char *msg); void SV_ClientPrintf(const char *fmt, ...) DP_FUNC_PRINTF(1); @@ -583,6 +581,12 @@ int SV_EntitiesInBox(const vec3_t mins, const vec3_t maxs, int maxedicts, prvm_e qbool SV_CanSeeBox(int numsamples, vec_t eyejitter, vec_t enlarge, vec_t entboxexpand, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs); +void SV_MarkWriteEntityStateToClient(entity_state_t *s, client_t *client); + +void SV_SendServerinfo(client_t *client); +void SV_WriteEntitiesToClient(client_t *client, prvm_edict_t *clent, sizebuf_t *msg, int maxsize); +void SV_AddCameraEyes(void); + int SV_PointSuperContents(const vec3_t point); void SV_FlushBroadcastMessages(void); @@ -592,13 +596,14 @@ void VM_SV_MoveToGoal(prvm_prog_t *prog); void SV_ApplyClientMove (void); void SV_SaveSpawnparms (void); + void SV_SpawnServer (const char *map); void SV_CheckVelocity (prvm_edict_t *ent); void SV_SetupVM(void); -const char *Host_TimingReport(char *buf, size_t buflen); ///< for output in SV_Status_f +const char *SV_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, qbool viewmatrix); @@ -621,7 +626,6 @@ 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); +qbool SV_VM_ConsoleCommand (const char *text); #endif -