]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - client.h
corrected a few LittleLongs to LittleFloat in md3 loading (EEP those were bad)
[xonotic/darkplaces.git] / client.h
index 1168ba8630807f2d4970d55b01c5b0b5b86427c9..4713f19dffb34561c45c4768529e1c6488d73978 100644 (file)
--- a/client.h
+++ b/client.h
@@ -56,9 +56,17 @@ cl_effect_t;
 typedef struct
 {
        int             entity;
+       // draw this as lightning polygons, or a model?
+       int             lightning;
        struct model_s  *model;
        float   endtime;
        vec3_t  start, end;
+       // if this beam is owned by an entity, this is the beam start relative to
+       // that entity's matrix for per frame start updates
+       vec3_t  relativestart;
+       vec3_t  relativeend;
+       // indicates whether relativestart is valid
+       int     relativestartvalid;
 }
 beam_t;
 
@@ -86,8 +94,8 @@ typedef struct frameblend_s
 }
 frameblend_t;
 
-// LordHavoc: disregard the following warning, entlights stuff is semi-persistent...
-// LordHavoc: nothing in this structure is persistent, it may be overwritten by the client every frame, for persistent data use entity_lerp_t.
+// LordHavoc: this struct is intended for the renderer but some fields are
+// used by the client.
 typedef struct entity_render_s
 {
        // location
@@ -116,14 +124,14 @@ typedef struct entity_render_s
        // render flags
        int flags;
 
-       // these are copied from the persistent data
+       // interpolated animation
 
        // frame that the model is interpolating from
        int frame1;
        // frame that the model is interpolating to
        int frame2;
        // interpolation factor, usually computed from frame2time
-       double framelerp;
+       float framelerp;
        // time frame1 began playing (for framegroup animations)
        double frame1time;
        // time frame2 began playing (for framegroup animations)
@@ -149,13 +157,12 @@ entity_render_t;
 
 typedef struct entity_persistent_s
 {
-       // particles
+       int linkframe;
 
-       // trail rendering
        vec3_t trail_origin;
-       float trail_time;
 
-       // effects
+       // particle trail
+       float trail_time;
 
        // muzzleflash fading
        float muzzleflash;
@@ -171,21 +178,6 @@ typedef struct entity_persistent_s
        float oldangles[3];
        float neworigin[3];
        float newangles[3];
-
-       // interpolated animation
-
-       // lerp resets when model changes
-       int modelindex;
-       // frame that the model is interpolating from
-       int frame1;
-       // frame that the model is interpolating to
-       int frame2;
-       // interpolation factor, usually computed from frame2time
-       double framelerp;
-       // time frame1 began playing (for framegroup animations)
-       double frame1time;
-       // time frame2 began playing (for framegroup animations)
-       double frame2time;
 }
 entity_persistent_t;
 
@@ -225,7 +217,6 @@ typedef struct
 typedef struct
 {
        char    name[MAX_SCOREBOARDNAME];
-       float   entertime;
        int             frags;
        int             colors; // two 4 bit fields
 } scoreboard_t;
@@ -283,7 +274,7 @@ typedef struct
        qboolean timedemo;
        // -1 = use normal cd track
        int forcetrack;
-       QFile *demofile;
+       qfile_t *demofile;
        // to meter out one message a frame
        int td_lastframe;
        // host_framecount at start
@@ -293,12 +284,17 @@ typedef struct
        // LordHavoc: pausedemo
        qboolean demopaused;
 
+       qboolean connect_trying;
+       int connect_remainingtries;
+       double connect_nextsendtime;
+       lhnetsocket_t *connect_mysocket;
+       lhnetaddress_t connect_address;
 
 // connection information
        // 0 to SIGNONS
        int signon;
-       // network socket
-       struct qsocket_s *netcon;
+       // network connection
+       netconn_t *netcon;
        // writing buffer to send to server
        sizebuf_t message;
 }
@@ -421,16 +417,14 @@ typedef struct
        // [cl.maxclients]
        scoreboard_t *scores;
 
-       // used by view code for setting up eye position
-       vec3_t viewentorigin;
        // LordHavoc: sniping zoom, QC controlled
        float viewzoom;
        // for interpolation
        float viewzoomold, viewzoomnew;
 
        // entity database stuff
-       vec3_t viewentoriginold, viewentoriginnew;
        entity_database_t entitydatabase;
+       entity_database4_t entitydatabase4;
 }
 client_state_t;
 
@@ -507,13 +501,17 @@ extern void CL_DecayLights (void);
 
 void CL_Init (void);
 
-void CL_EstablishConnection (char *host);
+void CL_EstablishConnection(const char *host);
 
 void CL_Disconnect (void);
 void CL_Disconnect_f (void);
 
 void CL_BoundingBoxForEntity(entity_render_t *ent);
 
+extern cvar_t cl_beams_polygons;
+extern cvar_t cl_beams_relative;
+extern cvar_t cl_beams_lightatend;
+
 //
 // cl_input
 //
@@ -555,14 +553,15 @@ char *Key_KeynumToString (int keynum);
 //
 // cl_demo.c
 //
-void CL_StopPlayback (void);
-int CL_GetMessage (void);
-
-void CL_NextDemo (void);
-void CL_Stop_f (void);
-void CL_Record_f (void);
-void CL_PlayDemo_f (void);
-void CL_TimeDemo_f (void);
+void CL_StopPlayback(void);
+void CL_ReadDemoMessage(void);
+void CL_WriteDemoMessage(void);
+
+void CL_NextDemo(void);
+void CL_Stop_f(void);
+void CL_Record_f(void);
+void CL_PlayDemo_f(void);
+void CL_TimeDemo_f(void);
 
 //
 // cl_parse.c