2020-09-08 22:10:45 +00:00
|
|
|
#if !defined(vr_client_info_h)
|
|
|
|
#define vr_client_info_h
|
|
|
|
|
2020-09-21 22:03:25 +00:00
|
|
|
#define NUM_WEAPON_SAMPLES 7
|
2020-09-20 21:56:36 +00:00
|
|
|
#define OLDER_READING (NUM_WEAPON_SAMPLES-1)
|
|
|
|
#define NEWER_READING (NUM_WEAPON_SAMPLES-5)
|
2020-09-08 22:10:45 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-09-09 22:16:24 +00:00
|
|
|
typedef float vec3_t[3];
|
2020-11-15 18:52:37 +00:00
|
|
|
typedef float vec4_t[4];
|
2020-09-09 22:16:24 +00:00
|
|
|
|
2020-09-08 22:10:45 +00:00
|
|
|
typedef struct {
|
|
|
|
bool screen;
|
|
|
|
float fov;
|
|
|
|
bool weapon_stabilised;
|
|
|
|
bool right_handed;
|
|
|
|
bool player_moving;
|
|
|
|
bool visible_hud;
|
|
|
|
bool dualwield;
|
|
|
|
int weaponid;
|
|
|
|
int lastweaponid;
|
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
//FP - Carry original values
|
|
|
|
vec4_t hmdorientation_quat;
|
|
|
|
vec3_t hmdtranslation;
|
|
|
|
vec3_t lhandposition;
|
|
|
|
vec3_t rhandposition;
|
|
|
|
vec4_t lhand_orientation_quat;
|
|
|
|
vec4_t rhand_orientation_quat;
|
|
|
|
|
|
|
|
|
2020-09-08 22:10:45 +00:00
|
|
|
vec3_t hmdposition;
|
|
|
|
vec3_t hmdposition_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t hmdposition_delta;
|
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
//FP - Temp Variables for other stuff
|
|
|
|
vec3_t hmdorientation_temp;
|
|
|
|
vec3_t weaponangles_temp;
|
|
|
|
vec3_t weaponangles_last_temp; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t weaponangles_delta_temp;
|
|
|
|
|
|
|
|
/*vec3_t hmdorientation;
|
2020-09-08 22:10:45 +00:00
|
|
|
vec3_t hmdorientation_last; // Don't use this, it is just for calculating delta!
|
2020-11-15 18:52:37 +00:00
|
|
|
vec3_t hmdorientation_delta;*/
|
2020-09-08 22:10:45 +00:00
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
/*vec3_t weaponangles_unadjusted;
|
2020-09-08 22:10:45 +00:00
|
|
|
vec3_t weaponangles;
|
|
|
|
vec3_t weaponangles_last; // Don't use this, it is just for calculating delta!
|
2020-11-15 18:52:37 +00:00
|
|
|
vec3_t weaponangles_delta;*/
|
2020-09-17 22:50:54 +00:00
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
//vec3_t flashlightHolsterOffset; // Where the flashlight can be picked up from
|
2020-09-17 22:50:54 +00:00
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
/*vec3_t current_weaponoffset;
|
2020-09-08 22:10:45 +00:00
|
|
|
float current_weaponoffset_timestamp;
|
|
|
|
vec3_t weaponoffset_history[NUM_WEAPON_SAMPLES];
|
2020-11-15 18:52:37 +00:00
|
|
|
float weaponoffset_history_timestamp[NUM_WEAPON_SAMPLES];*/
|
2020-09-08 22:10:45 +00:00
|
|
|
|
2020-09-20 21:56:36 +00:00
|
|
|
vec3_t throw_origin;
|
|
|
|
vec3_t throw_trajectory;
|
|
|
|
float throw_power;
|
|
|
|
|
2020-09-08 22:10:45 +00:00
|
|
|
bool pistol; // True if the weapon is a pistol
|
|
|
|
|
|
|
|
bool velocitytriggered; // Weapon attack triggered by velocity (knife)
|
2020-12-10 18:52:33 +00:00
|
|
|
bool velocitytriggeredoffhand; // Weapon attack triggered by velocity (puncher)
|
|
|
|
bool velocitytriggeredoffhandstate; // Weapon attack triggered by velocity (puncher)
|
2020-09-08 22:10:45 +00:00
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
vec3_t offhandangles_temp;
|
|
|
|
vec3_t offhandoffset_temp;
|
2020-09-08 22:10:45 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Teleport Stuff
|
|
|
|
//
|
2020-11-15 18:52:37 +00:00
|
|
|
/*bool teleportenabled;
|
2020-09-08 22:10:45 +00:00
|
|
|
bool teleportseek; // player looking to teleport
|
|
|
|
bool teleportready; // player pointing to a valid teleport location
|
|
|
|
vec3_t teleportdest; // teleport destination
|
2020-11-15 18:52:37 +00:00
|
|
|
bool teleportexecute; // execute the teleport*/
|
2020-09-08 22:10:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
|
// Test stuff for weapon alignment
|
|
|
|
//////////////////////////////////////
|
|
|
|
|
2020-11-15 18:52:37 +00:00
|
|
|
/*char test_name[256];
|
2020-09-08 22:10:45 +00:00
|
|
|
float test_scale;
|
|
|
|
vec3_t test_angles;
|
2020-11-15 18:52:37 +00:00
|
|
|
vec3_t test_offset;*/
|
2020-09-08 22:10:45 +00:00
|
|
|
|
2020-09-15 23:02:29 +00:00
|
|
|
} vrClientInfo;
|
2020-09-08 22:10:45 +00:00
|
|
|
|
2020-09-15 23:02:29 +00:00
|
|
|
extern vrClientInfo *pVRClientInfo;
|
2020-09-08 22:10:45 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //vr_client_info_h
|