2009-01-11 22:00:00 +01:00
|
|
|
|
//=======================================================================
|
|
|
|
|
// Copyright XashXT Group 2009 <20>
|
|
|
|
|
// ref_params.h - client rendering state
|
|
|
|
|
//=======================================================================
|
|
|
|
|
#ifndef REF_PARAMS_H
|
|
|
|
|
#define REF_PARAMS_H
|
|
|
|
|
|
2009-01-22 22:00:00 +01:00
|
|
|
|
// prev.state values to interpolate from
|
|
|
|
|
typedef struct latched_params_s
|
|
|
|
|
{
|
|
|
|
|
vec3_t origin;
|
|
|
|
|
vec3_t angles;
|
|
|
|
|
vec3_t viewheight;
|
|
|
|
|
vec3_t punchangle;
|
|
|
|
|
} latched_params_t;
|
|
|
|
|
|
2009-07-12 22:00:00 +02:00
|
|
|
|
typedef struct
|
|
|
|
|
{
|
|
|
|
|
float fov;
|
|
|
|
|
float scale;
|
|
|
|
|
vec3_t vieworg;
|
|
|
|
|
vec3_t viewanglesOffset;
|
|
|
|
|
} skyportal_t;
|
|
|
|
|
|
2009-01-11 22:00:00 +01:00
|
|
|
|
typedef struct ref_params_s
|
|
|
|
|
{
|
|
|
|
|
// output
|
|
|
|
|
int viewport[4]; // x, y, width, height
|
|
|
|
|
vec3_t vieworg;
|
|
|
|
|
vec3_t viewangles;
|
|
|
|
|
float fov_x;
|
|
|
|
|
float fov_y; // fov_y = V_CalcFov( fov_x, viewport[2], viewport[3] );
|
|
|
|
|
|
|
|
|
|
vec3_t forward;
|
|
|
|
|
vec3_t right;
|
|
|
|
|
vec3_t up;
|
|
|
|
|
|
|
|
|
|
float frametime; // client frametime
|
|
|
|
|
float lerpfrac; // between oldframe and frame
|
|
|
|
|
float time; // client time
|
|
|
|
|
float oldtime; // studio lerping
|
|
|
|
|
|
2009-09-13 22:00:00 +02:00
|
|
|
|
|
|
|
|
|
usercmd_t *cmd; // last issued usercmd
|
2009-01-22 22:00:00 +01:00
|
|
|
|
movevars_t *movevars; // sv.movevars
|
|
|
|
|
latched_params_t prev;
|
|
|
|
|
|
2009-01-11 22:00:00 +01:00
|
|
|
|
// misc
|
2009-07-12 22:00:00 +02:00
|
|
|
|
int rdflags;
|
2009-01-11 22:00:00 +01:00
|
|
|
|
BOOL intermission;
|
|
|
|
|
BOOL demoplayback;
|
|
|
|
|
BOOL demorecord;
|
|
|
|
|
BOOL paused;
|
2009-01-22 22:00:00 +01:00
|
|
|
|
BOOL thirdperson; // thirdperson mode
|
|
|
|
|
BOOL predicting; // client movement predicting is running
|
2009-01-11 22:00:00 +01:00
|
|
|
|
int onlyClientDraw; // 1 - don't draw worldmodel
|
2009-07-12 22:00:00 +02:00
|
|
|
|
int nextView; // num RenderView passes
|
2009-01-11 22:00:00 +01:00
|
|
|
|
edict_t *onground; // pointer to onground entity
|
|
|
|
|
byte *areabits; // come from server, contains visible areas list
|
|
|
|
|
int waterlevel;
|
2009-09-13 22:00:00 +02:00
|
|
|
|
int movetype; // client movetype
|
2009-01-11 22:00:00 +01:00
|
|
|
|
|
2009-07-12 22:00:00 +02:00
|
|
|
|
skyportal_t skyportal;
|
|
|
|
|
|
2009-01-11 22:00:00 +01:00
|
|
|
|
// input
|
2009-07-12 22:00:00 +02:00
|
|
|
|
float blend[4]; // rgba 0-1 full screen blend
|
2009-01-11 22:00:00 +01:00
|
|
|
|
vec3_t velocity;
|
2009-01-23 22:00:00 +01:00
|
|
|
|
vec3_t cl_viewangles; // predicted angles
|
|
|
|
|
vec3_t angles; // viewangles that came from server
|
2009-01-11 22:00:00 +01:00
|
|
|
|
vec3_t origin; // origin + viewheight = vieworg
|
|
|
|
|
vec3_t viewheight;
|
2009-09-13 22:00:00 +02:00
|
|
|
|
float idealpitch;
|
|
|
|
|
|
2009-01-11 22:00:00 +01:00
|
|
|
|
int health;
|
|
|
|
|
vec3_t crosshairangle; // pfnCrosshairAngle values from server
|
2009-09-13 22:00:00 +02:00
|
|
|
|
vec3_t punchangle; // receivied from server
|
2009-01-11 22:00:00 +01:00
|
|
|
|
int clientnum;
|
2009-01-22 22:00:00 +01:00
|
|
|
|
int viewmodel; // viewmodel index
|
2009-01-11 22:00:00 +01:00
|
|
|
|
int num_entities;
|
|
|
|
|
int max_entities;
|
|
|
|
|
int max_clients;
|
|
|
|
|
} ref_params_t;
|
|
|
|
|
|
|
|
|
|
#endif//REF_PARAMS_H
|