char name[MAX_SCOREBOARDNAME];
float entertime;
int frags;
- int colors; // two 4 bit fields
-// byte translations[256]; // LordHavoc: major memory reduction (was VID_GRADES*256, and VID_GRADES is 64), and weirdness cleanup
+ int colors; // two 4 bit fields
} scoreboard_t;
typedef struct
struct model_s *model;
float endtime;
vec3_t start, end;
-} beam_t;
+}
+beam_t;
// LordHavoc: increased MAX_EFRAGS from 640 to 2048
-#define MAX_EFRAGS 2048
+//#define MAX_EFRAGS 2048
#define MAX_MAPSTRING 2048
#define MAX_DEMOS 8
#define MAX_DEMONAME 16
-typedef enum {
-ca_dedicated, // a dedicated server with no ability to start a client
-ca_disconnected, // full screen console with no connection
-ca_connected // valid netcon, talking to a server
-} cactive_t;
+typedef enum
+{
+ ca_dedicated, // a dedicated server with no ability to start a client
+ ca_disconnected, // full screen console with no connection
+ ca_connected // valid netcon, talking to a server
+}
+cactive_t;
//
// the client_static_t structure is persistant through an arbitrary number
int signon; // 0 to SIGNONS
struct qsocket_s *netcon;
sizebuf_t message; // writing buffer to send to server
-
-} client_static_t;
+}
+client_static_t;
extern client_static_t cls;
// information for local display
int stats[MAX_CL_STATS]; // health, etc
int items; // inventory bit flags
- float item_gettime[32]; // cl.time of aquiring item, for blinking
+ float item_gettime[32]; // cl.time of acquiring item, for blinking
float faceanimtime; // use anim frame if cl.time < this
cshift_t cshifts[NUM_CSHIFTS]; // color shifts for damage, powerups
vec3_t velocity; // lerped between mvelocity[0] and [1]
vec3_t punchangle; // temporary offset
-
+ vec3_t punchvector; // LordHavoc: origin view kick
+
// pitch drifting vars
float idealpitch;
float pitchvel;
qboolean paused; // send over by server
qboolean onground;
qboolean inwater;
-
+
int intermission; // don't change view angle, full screen, etc
int completed_time; // latched at intermission start
-
+
double mtime[2]; // the timestamp of last two messages
double time; // clients view of time, should be between
// servertime and oldservertime to generate
// a lerp point for other data
double oldtime; // previous cl.time, time-oldtime is used
// to decay light values and smooth step ups
-
+
+ double frametime;
+
float last_received_message; // (realtime) for net trouble icon
// refresh related state
struct model_s *worldmodel; // cl_entitites[0].model
- struct efrag_s *free_efrags;
- int num_entities; // held in cl_entities array
+// struct efrag_s *free_efrags;
+// int num_entities; // held in cl_entities array
int num_statics; // held in cl_staticentities array
entity_t viewent; // the gun model
// frag scoreboard
scoreboard_t *scores; // [cl.maxclients]
-} client_state_t;
+}
+client_state_t;
//
extern cvar_t m_side;
-#define MAX_TEMP_ENTITIES 64 // lightning bolts, etc
-#define MAX_STATIC_ENTITIES 128 // torches, etc
+// LordHavoc: raised these from 64 and 128 to 512 and 256
+#define MAX_TEMP_ENTITIES 512 // lightning bolts, effects, etc
+#define MAX_STATIC_ENTITIES 256 // torches, etc
extern client_state_t cl;
// FIXME, allocate dynamically
-extern efrag_t cl_efrags[MAX_EFRAGS];
+//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];
//
// cl_main
//
-dlight_t *CL_AllocDlight (int key);
-void CL_DecayLights (void);
+void CL_AllocDlight (entity_t *ent, vec3_t org, float radius, float red, float green, float blue, float decay, float lifetime);
+void CL_DecayLights (void);
void CL_Init (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];
+// LordHavoc: raised this from 256 to the maximum possible number of entities visible
+#define MAX_VISEDICTS (MAX_EDICTS + MAX_STATIC_ENTITIES + MAX_TEMP_ENTITIES)
+extern int cl_numvisedicts;
+extern entity_t *cl_visedicts[MAX_VISEDICTS];
//
// cl_input
{
int down[2]; // key nums holding it down
int state; // low bit is down state
-} kbutton_t;
+}
+kbutton_t;
extern kbutton_t in_mlook, in_klook;
extern kbutton_t in_strafe;
void CL_ParseTEnt (void);
void CL_UpdateTEnts (void);
+void CL_DoEffects (void);
+
+entity_t *CL_NewTempEntity (void);
+
+void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float framerate);
void CL_ClearState (void);
void V_StopPitchDrift (void);
void V_RenderView (void);
-void V_UpdatePalette (void);
+void V_UpdateBlends (void);
void V_Register (void);
void V_ParseDamage (void);
void V_SetContentsColor (int contents);