#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
#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
// 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
#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)
+#define RENDER_NOSELFSHADOW 262144 // render lighting on this entity before its own shadow is added to the scene
+// (note: all RENDER_NOSELFSHADOW entities are grouped together and rendered in a batch before their shadows are rendered, so they can not shadow eachother either)
-// 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
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;
extern entity_state_t defaultstate;
// reads a quake entity from the network stream
void EntityFrameQuake_ReadEntity(int bits);
+// checks for stats changes and sets corresponding host_client->statsdeltabits
+// (also updates host_client->stats array)
+void Protocol_UpdateClientStats(const int *stats);
+// writes reliable messages updating stats (not used by DP6 and later
+// protocols which send updates in their WriteFrame function using a different
+// method of reliable messaging)
+void Protocol_WriteStatsReliable(void);
// writes a list of quake entities to the network stream
// (or as many will fit)
void EntityFrameQuake_WriteFrame(sizebuf_t *msg, int numstates, const entity_state_t *states);
// (derived from states)
unsigned char *visiblebits; // [(maxedicts+7)/8]
- // delta compression of stats
- unsigned char statsdeltabits[(MAX_CL_STATS+7)/8];
- int stats[MAX_CL_STATS];
-
// old notes
// this is used to decide which changestates to set each frame
void EntityFrame5_CL_ReadFrame(void);
void EntityFrame5_LostFrame(entityframe5_database_t *d, int framenum);
void EntityFrame5_AckFrame(entityframe5_database_t *d, int framenum);
-void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int numstates, const entity_state_t *states, int viewentnum, int *stats, int movesequence);
+void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int numstates, const entity_state_t *states, int viewentnum, int movesequence);
extern cvar_t developer_networkentities;