]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - protocol.h
changed entity networking prioritization code to use the center of the model rather...
[xonotic/darkplaces.git] / protocol.h
index 46a9ea525347dbb49d3ad9254f66ebc8daa32555..c7bbf20503b1ec2b5bf4ec20dc0290f84dcad7b8 100644 (file)
@@ -224,8 +224,8 @@ void Protocol_Names(char *buffer, size_t buffersize);
 #define        svc_hidelmp                     36              // [string] slotname
 #define        svc_skybox                      37              // [string] skyname
 
-// LordHavoc: my svc_ range, 50-59
-#define svc_cgame                      50              // [short] length [bytes] data
+// LordHavoc: my svc_ range, 50-69
+#define svc_downloaddata       50              // [int] start [short] size
 #define svc_updatestatubyte    51              // [byte] stat [byte] value
 #define svc_effect                     52              // [vector] org [byte] modelindex [byte] startframe [byte] framecount [byte] framerate
 #define svc_effect2                    53              // [vector] org [short] modelindex [short] startframe [byte] framecount [byte] framerate
@@ -236,6 +236,8 @@ void Protocol_Names(char *buffer, size_t buffersize);
 #define svc_entities           57              // [int] deltaframe [int] thisframe [float vector] eye [variable length] entitydata
 #define svc_csqcentities       58              // [short] entnum [variable length] entitydata ... [short] 0x0000
 #define        svc_spawnstaticsound2   59      // [coord3] [short] samp [byte] vol [byte] aten
+#define svc_trailparticles     60              // [short] entnum [short] effectnum [vector] start [vector] end
+#define svc_pointparticles     61              // [short] effectnum [vector] start [vector] end [short] count
 
 //
 // client to server
@@ -248,7 +250,7 @@ void Protocol_Names(char *buffer, size_t buffersize);
 
 // LordHavoc: my clc_ range, 50-59
 #define clc_ackframe   50              // [int] framenumber
-#define clc_unusedlh1  51
+#define clc_ackdownloaddata    51      // [int] start [short] size   (note: exact echo of latest values received in svc_downloaddata, packet-loss handling is in the server)
 #define clc_unusedlh2  52
 #define clc_unusedlh3  53
 #define clc_unusedlh4  54
@@ -317,14 +319,13 @@ void Protocol_Names(char *buffer, size_t buffersize);
 #define RENDER_COLORMAPPED 32
 #define RENDER_SHADOW 65536 // cast shadow
 #define RENDER_LIGHT 131072 // receive light
-#define RENDER_TRANSPARENT 262144 // can't light during opaque stage
-#define RENDER_NOCULLFACE 524288 // render as double sided (disable GL_CULL_FACE)
 
-// this is 88 bytes
+// this is 96 bytes
 typedef struct entity_state_s
 {
        // ! means this is not sent to client
        double time; // ! time this state was built (used on client for interpolation)
+       float netcenter[3]; // ! for network prioritization, this is the center of the bounding box (which may differ from the origin)
        float origin[3];
        float angles[3];
        int number; // entity number this state is for
@@ -352,7 +353,7 @@ typedef struct entity_state_s
        unsigned char tagindex;
        unsigned char colormod[3];
        // padding to a multiple of 8 bytes (to align the double time)
-       unsigned char unused[6];
+       unsigned char unused[2];
 }
 entity_state_t;