2022-09-18 15:37:21 +00:00
|
|
|
#if !defined(vr_client_info_h)
|
|
|
|
#define vr_client_info_h
|
|
|
|
|
|
|
|
#define NUM_WEAPON_SAMPLES 10
|
|
|
|
|
|
|
|
typedef struct {
|
2022-09-27 22:19:12 +00:00
|
|
|
bool in_camera; // cinematic camera taken over
|
|
|
|
bool using_screen_layer;
|
2022-09-18 15:37:21 +00:00
|
|
|
float fov;
|
2022-09-27 22:19:12 +00:00
|
|
|
bool immersive_cinematics;
|
2022-09-19 21:46:47 +00:00
|
|
|
bool weapon_stabilised;
|
|
|
|
bool right_handed;
|
|
|
|
bool player_moving;
|
2022-09-18 15:37:21 +00:00
|
|
|
int weaponid;
|
|
|
|
int lastweaponid;
|
2022-09-19 21:46:47 +00:00
|
|
|
bool mountedgun;
|
2022-10-12 21:35:27 +00:00
|
|
|
int cgzoommode;
|
2022-09-18 15:37:21 +00:00
|
|
|
|
|
|
|
vec3_t hmdposition;
|
|
|
|
vec3_t hmdposition_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t hmdposition_delta;
|
|
|
|
|
|
|
|
vec3_t hmdorientation;
|
|
|
|
vec3_t hmdorientation_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t hmdorientation_delta;
|
|
|
|
|
2022-10-02 22:17:51 +00:00
|
|
|
vec3_t weaponangles_saber;
|
2022-09-18 15:37:21 +00:00
|
|
|
vec3_t weaponangles;
|
|
|
|
vec3_t weaponangles_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t weaponangles_delta;
|
|
|
|
|
2022-09-27 22:19:12 +00:00
|
|
|
vec3_t clientviewangles; //orientation in the client - we use this in the cgame
|
|
|
|
float snapTurn; // how much turn has been applied to the yaw by joystick
|
|
|
|
|
|
|
|
vec3_t weaponposition;
|
|
|
|
vec3_t weaponoffset;
|
|
|
|
float weaponoffset_timestamp;
|
2022-09-18 15:37:21 +00:00
|
|
|
vec3_t weaponoffset_history[NUM_WEAPON_SAMPLES];
|
|
|
|
float weaponoffset_history_timestamp[NUM_WEAPON_SAMPLES];
|
|
|
|
|
2022-10-12 17:00:26 +00:00
|
|
|
bool item_selector;
|
|
|
|
|
2022-09-19 21:46:47 +00:00
|
|
|
bool pistol; // True if the weapon is a pistol
|
2022-09-18 15:37:21 +00:00
|
|
|
|
|
|
|
//Lots of scope weapon stuff
|
2022-09-19 21:46:47 +00:00
|
|
|
bool scopeengaged; // Scope has been engaged on a scoped weapon
|
|
|
|
bool scopedweapon; // Weapon scope is available
|
|
|
|
bool scopedetached; // Scope has been detached from weapon
|
|
|
|
bool detachablescope; // Scope can be detached from weapon
|
2022-09-18 15:37:21 +00:00
|
|
|
|
2022-09-19 21:46:47 +00:00
|
|
|
bool hasbinoculars;
|
2022-09-18 15:37:21 +00:00
|
|
|
|
2022-10-02 22:17:51 +00:00
|
|
|
bool velocitytriggered;
|
2022-10-04 21:48:30 +00:00
|
|
|
float primaryswingvelocity;
|
2022-10-12 17:00:26 +00:00
|
|
|
bool primaryVelocityTriggeredAttack;
|
2022-10-04 21:48:30 +00:00
|
|
|
float secondaryswingvelocity;
|
2022-10-12 17:00:26 +00:00
|
|
|
bool secondaryVelocityTriggeredAttack;
|
2022-09-18 15:37:21 +00:00
|
|
|
|
|
|
|
vec3_t offhandangles;
|
|
|
|
vec3_t offhandangles_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t offhandangles_delta;
|
|
|
|
|
2022-09-27 22:19:12 +00:00
|
|
|
vec3_t offhandposition;
|
2022-09-18 15:37:21 +00:00
|
|
|
vec3_t offhandoffset;
|
|
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
|
// Test stuff for weapon alignment
|
|
|
|
//////////////////////////////////////
|
|
|
|
|
|
|
|
char test_name[256];
|
|
|
|
float test_scale;
|
|
|
|
vec3_t test_angles;
|
|
|
|
vec3_t test_offset;
|
|
|
|
|
|
|
|
} vr_client_info_t;
|
|
|
|
|
2022-09-28 22:07:22 +00:00
|
|
|
#ifndef JKVR_CLIENT
|
|
|
|
extern vr_client_info_t *vr;
|
|
|
|
#endif
|
|
|
|
|
2022-09-18 15:37:21 +00:00
|
|
|
#endif //vr_client_info_h
|