123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376 |
- typedef struct
- {
- vec3_t viewangles;
- float forwardmove;
- float sidemove;
- float upmove;
- #ifdef QUAKE2
- byte lightlevel;
- #endif
- } usercmd_t;
- typedef struct
- {
- int length;
- char map[MAX_STYLESTRING];
- } lightstyle_t;
- typedef struct
- {
- char name[MAX_SCOREBOARDNAME];
- float entertime;
- int frags;
- int colors;
- byte translations[VID_GRADES*256];
- } scoreboard_t;
- typedef struct
- {
- int destcolor[3];
- int percent;
- } cshift_t;
- #define CSHIFT_CONTENTS 0
- #define CSHIFT_DAMAGE 1
- #define CSHIFT_BONUS 2
- #define CSHIFT_POWERUP 3
- #define NUM_CSHIFTS 4
- #define NAME_LENGTH 64
- #define SIGNONS 4
- #define MAX_DLIGHTS 32
- typedef struct
- {
- vec3_t origin;
- float radius;
- float die;
- float decay;
- float minlight;
- int key;
- #ifdef QUAKE2
- qboolean dark;
- #endif
- } dlight_t;
- #define MAX_BEAMS 24
- typedef struct
- {
- int entity;
- struct model_s *model;
- float endtime;
- vec3_t start, end;
- } beam_t;
- #define MAX_EFRAGS 640
- #define MAX_MAPSTRING 2048
- #define MAX_DEMOS 8
- #define MAX_DEMONAME 16
- typedef enum {
- ca_dedicated,
- ca_disconnected,
- ca_connected
- } cactive_t;
- typedef struct
- {
- cactive_t state;
- char mapstring[MAX_QPATH];
- char spawnparms[MAX_MAPSTRING];
- int demonum;
- char demos[MAX_DEMOS][MAX_DEMONAME];
- qboolean demorecording;
- qboolean demoplayback;
- qboolean timedemo;
- int forcetrack;
- FILE *demofile;
- int td_lastframe;
- int td_startframe;
- float td_starttime;
- int signon;
- struct qsocket_s *netcon;
- sizebuf_t message;
-
- } client_static_t;
- extern client_static_t cls;
- typedef struct
- {
- int movemessages;
-
-
-
- usercmd_t cmd;
- int stats[MAX_CL_STATS];
- int items;
- float item_gettime[32];
- float faceanimtime;
- cshift_t cshifts[NUM_CSHIFTS];
- cshift_t prev_cshifts[NUM_CSHIFTS];
- vec3_t mviewangles[2];
-
- vec3_t viewangles;
-
- vec3_t mvelocity[2];
-
- vec3_t velocity;
- vec3_t punchangle;
-
- float idealpitch;
- float pitchvel;
- qboolean nodrift;
- float driftmove;
- double laststop;
- float viewheight;
- float crouch;
- qboolean paused;
- qboolean onground;
- qboolean inwater;
-
- int intermission;
- int completed_time;
-
- double mtime[2];
- double time;
-
-
- double oldtime;
-
-
- float last_received_message;
- struct model_s *model_precache[MAX_MODELS];
- struct sfx_s *sound_precache[MAX_SOUNDS];
- char levelname[40];
- int viewentity;
- int maxclients;
- int gametype;
- struct model_s *worldmodel;
- struct efrag_s *free_efrags;
- int num_entities;
- int num_statics;
- entity_t viewent;
- int cdtrack, looptrack;
- scoreboard_t *scores;
- #ifdef QUAKE2
- int light_level;
- #endif
- } client_state_t;
- extern cvar_t cl_name;
- extern cvar_t cl_color;
- extern cvar_t cl_upspeed;
- extern cvar_t cl_forwardspeed;
- extern cvar_t cl_backspeed;
- extern cvar_t cl_sidespeed;
- extern cvar_t cl_movespeedkey;
- extern cvar_t cl_yawspeed;
- extern cvar_t cl_pitchspeed;
- extern cvar_t cl_anglespeedkey;
- extern cvar_t cl_autofire;
- extern cvar_t cl_shownet;
- extern cvar_t cl_nolerp;
- extern cvar_t cl_pitchdriftspeed;
- extern cvar_t lookspring;
- extern cvar_t lookstrafe;
- extern cvar_t sensitivity;
- extern cvar_t m_pitch;
- extern cvar_t m_yaw;
- extern cvar_t m_forward;
- extern cvar_t m_side;
- #define MAX_TEMP_ENTITIES 64
- #define MAX_STATIC_ENTITIES 128
- extern client_state_t cl;
- extern efrag_t cl_efrags[MAX_EFRAGS];
- extern entity_t cl_entities[MAX_EDICTS];
- extern entity_t cl_static_entities[MAX_STATIC_ENTITIES];
- extern lightstyle_t cl_lightstyle[MAX_LIGHTSTYLES];
- extern dlight_t cl_dlights[MAX_DLIGHTS];
- extern entity_t cl_temp_entities[MAX_TEMP_ENTITIES];
- extern beam_t cl_beams[MAX_BEAMS];
- dlight_t *CL_AllocDlight (int key);
- void CL_DecayLights (void);
- void CL_Init (void);
- void CL_EstablishConnection (char *host);
- void CL_Signon1 (void);
- void CL_Signon2 (void);
- void CL_Signon3 (void);
- void CL_Signon4 (void);
- void CL_Disconnect (void);
- void CL_Disconnect_f (void);
- void CL_NextDemo (void);
- #define MAX_VISEDICTS 256
- extern int cl_numvisedicts;
- extern entity_t *cl_visedicts[MAX_VISEDICTS];
- typedef struct
- {
- int down[2];
- int state;
- } kbutton_t;
- extern kbutton_t in_mlook, in_klook;
- extern kbutton_t in_strafe;
- extern kbutton_t in_speed;
- void CL_InitInput (void);
- void CL_SendCmd (void);
- void CL_SendMove (usercmd_t *cmd);
- void CL_ParseTEnt (void);
- void CL_UpdateTEnts (void);
- void CL_ClearState (void);
- int CL_ReadFromServer (void);
- void CL_WriteToServer (usercmd_t *cmd);
- void CL_BaseMove (usercmd_t *cmd);
- float CL_KeyState (kbutton_t *key);
- char *Key_KeynumToString (int keynum);
- void CL_StopPlayback (void);
- int CL_GetMessage (void);
- void CL_Stop_f (void);
- void CL_Record_f (void);
- void CL_PlayDemo_f (void);
- void CL_TimeDemo_f (void);
- void CL_ParseServerMessage (void);
- void CL_NewTranslation (int slot);
- void V_StartPitchDrift (void);
- void V_StopPitchDrift (void);
- void V_RenderView (void);
- void V_UpdatePalette (void);
- void V_Register (void);
- void V_ParseDamage (void);
- void V_SetContentsColor (int contents);
- void CL_InitTEnts (void);
- void CL_SignonReply (void);
|