2020-09-08 22:10:45 +00:00
|
|
|
#if !defined(vr_client_info_h)
|
|
|
|
#define vr_client_info_h
|
|
|
|
|
|
|
|
#define NUM_WEAPON_SAMPLES 10
|
|
|
|
#define WEAPON_RECOIL 15.0f;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2020-09-09 22:16:24 +00:00
|
|
|
typedef float vec3_t[3];
|
|
|
|
|
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-09-17 21:46:48 +00:00
|
|
|
int holsteritemactive; //0 - nothing, 1 - flashlight
|
2020-09-19 21:30:26 +00:00
|
|
|
bool laserSightActive;
|
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;
|
|
|
|
|
|
|
|
vec3_t hmdorientation;
|
|
|
|
vec3_t hmdorientation_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t hmdorientation_delta;
|
|
|
|
|
2020-09-15 23:02:29 +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!
|
|
|
|
vec3_t weaponangles_delta;
|
|
|
|
|
2020-09-18 22:34:27 +00:00
|
|
|
vec3_t flashlightHolsterOffset; // Where the flashlight can be picked up from
|
2020-09-17 22:50:54 +00:00
|
|
|
|
|
|
|
|
2020-09-08 22:10:45 +00:00
|
|
|
vec3_t current_weaponoffset;
|
|
|
|
vec3_t calculated_weaponoffset;
|
|
|
|
float current_weaponoffset_timestamp;
|
|
|
|
vec3_t weaponoffset_history[NUM_WEAPON_SAMPLES];
|
|
|
|
float weaponoffset_history_timestamp[NUM_WEAPON_SAMPLES];
|
|
|
|
|
|
|
|
bool pistol; // True if the weapon is a pistol
|
|
|
|
|
|
|
|
bool velocitytriggered; // Weapon attack triggered by velocity (knife)
|
|
|
|
|
|
|
|
vec3_t offhandangles;
|
|
|
|
vec3_t offhandoffset;
|
|
|
|
|
|
|
|
//
|
|
|
|
// Teleport Stuff
|
|
|
|
//
|
|
|
|
bool teleportenabled;
|
|
|
|
bool teleportseek; // player looking to teleport
|
|
|
|
bool teleportready; // player pointing to a valid teleport location
|
|
|
|
vec3_t teleportdest; // teleport destination
|
|
|
|
bool teleportexecute; // execute the teleport
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////
|
|
|
|
// Test stuff for weapon alignment
|
|
|
|
//////////////////////////////////////
|
|
|
|
|
|
|
|
char test_name[256];
|
|
|
|
float test_scale;
|
|
|
|
vec3_t test_angles;
|
|
|
|
vec3_t test_offset;
|
|
|
|
|
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
|