2022-09-18 15:37:21 +00:00
|
|
|
#if !defined(vr_client_info_h)
|
|
|
|
#define vr_client_info_h
|
|
|
|
|
|
|
|
#define NUM_WEAPON_SAMPLES 10
|
|
|
|
|
2023-02-26 09:45:41 +00:00
|
|
|
#define ANGLES_DEFAULT 0
|
|
|
|
#define ANGLES_ADJUSTED 1
|
|
|
|
#define ANGLES_SABER 2
|
|
|
|
#define ANGLES_COUNT 3
|
|
|
|
|
2023-03-05 08:48:31 +00:00
|
|
|
#define USE_GESTURE_OFF_HAND 1
|
|
|
|
#define USE_GESTURE_WEAPON_HAND 2
|
2023-04-01 16:48:42 +00:00
|
|
|
#define USE_HAPTIC_FEEDBACK_DELAY 500
|
2023-03-05 08:48:31 +00:00
|
|
|
|
2023-04-01 09:25:11 +00:00
|
|
|
typedef struct {
|
|
|
|
bool loaded;
|
|
|
|
float scale;
|
|
|
|
vec3_t angles;
|
|
|
|
vec3_t offset;
|
|
|
|
} vr_weapon_adjustment_t;
|
|
|
|
|
2022-09-18 15:37:21 +00:00
|
|
|
typedef struct {
|
2022-10-26 22:37:42 +00:00
|
|
|
bool cin_camera; // cinematic camera taken over
|
2022-11-16 21:12:28 +00:00
|
|
|
|
2022-10-26 22:37:42 +00:00
|
|
|
bool misc_camera; // looking through a misc camera view entity
|
2022-11-07 22:14:36 +00:00
|
|
|
bool remote_turret; // controlling a remote turret
|
2022-12-14 18:19:58 +00:00
|
|
|
bool emplaced_gun; // controlling an emplaced gun
|
2022-11-16 21:12:28 +00:00
|
|
|
bool remote_droid; // controlling a remote droid
|
|
|
|
bool remote_npc; // controlling a remote NPC (will also be true when controlling a droid)
|
2023-01-28 15:28:24 +00:00
|
|
|
bool in_vehicle; // controlling a vehicle
|
2023-05-14 21:50:24 +00:00
|
|
|
int vehicle_type;
|
2023-01-26 22:03:41 +00:00
|
|
|
vec3_t remote_angles; // The view angles of the remote thing we are controlling
|
|
|
|
float remote_snapTurn; // how much turn has been applied to the yaw by joystick for a remote controlled entity
|
|
|
|
int remote_cooldown;
|
2022-11-16 21:12:28 +00:00
|
|
|
|
2023-07-27 20:56:20 +00:00
|
|
|
int eye;
|
2022-09-27 22:19:12 +00:00
|
|
|
bool using_screen_layer;
|
2022-10-31 22:17:09 +00:00
|
|
|
bool third_person;
|
2022-12-09 18:57:02 +00:00
|
|
|
float fov_x;
|
|
|
|
float fov_y;
|
2023-07-27 20:56:20 +00:00
|
|
|
float off_center_fov;
|
2023-04-02 21:18:28 +00:00
|
|
|
|
|
|
|
float tempWeaponVelocity;
|
|
|
|
|
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;
|
2023-04-01 10:07:13 +00:00
|
|
|
bool menu_right_handed;
|
2022-09-19 21:46:47 +00:00
|
|
|
bool player_moving;
|
2022-11-25 23:25:37 +00:00
|
|
|
int move_speed; // 0 (default) = Comfortable (75%) , 1 = Full (100%), 2 = Walk (50%)
|
2022-11-11 23:43:50 +00:00
|
|
|
bool crouched;
|
2023-03-08 21:05:28 +00:00
|
|
|
bool dualsabers; // JKA only - is player dual sabers active
|
2022-10-12 21:35:27 +00:00
|
|
|
int cgzoommode;
|
2023-01-19 21:16:20 +00:00
|
|
|
int cgzoomdir;
|
2022-11-11 23:43:50 +00:00
|
|
|
int saberBlockDebounce; // Amount of time after player is blocked that the saber position is fixed
|
2023-04-04 21:37:41 +00:00
|
|
|
short saberBounceMove;
|
2022-09-18 15:37:21 +00:00
|
|
|
|
2022-10-20 16:47:12 +00:00
|
|
|
int forceid;
|
|
|
|
|
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!
|
2022-10-30 23:15:58 +00:00
|
|
|
vec3_t hmdposition_delta; // delta since last frame
|
|
|
|
vec3_t hmdposition_snap; // The position the HMD was in last time the menu was up (snapshot position)
|
|
|
|
vec3_t hmdposition_offset; // offset from the position the HMD was in last time the menu was up
|
2022-09-18 15:37:21 +00:00
|
|
|
|
2023-01-23 22:49:03 +00:00
|
|
|
bool take_snap;
|
|
|
|
|
2022-09-18 15:37:21 +00:00
|
|
|
vec3_t hmdorientation;
|
|
|
|
vec3_t hmdorientation_last; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t hmdorientation_delta;
|
2022-10-30 23:15:58 +00:00
|
|
|
vec3_t hmdorientation_snap;
|
2022-10-31 22:17:09 +00:00
|
|
|
vec3_t hmdorientation_first; // only updated when in first person
|
2022-09-18 15:37:21 +00:00
|
|
|
|
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
|
2022-11-25 18:01:08 +00:00
|
|
|
float clientview_yaw_last; // Don't use this, it is just for calculating delta!
|
|
|
|
float clientview_yaw_delta;
|
2022-09-27 22:19:12 +00:00
|
|
|
|
2023-02-26 09:45:41 +00:00
|
|
|
vec3_t weaponangles[ANGLES_COUNT];
|
|
|
|
vec3_t weaponangles_last[ANGLES_COUNT]; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t weaponangles_delta[ANGLES_COUNT];
|
|
|
|
vec3_t weaponangles_first[ANGLES_COUNT]; // only updated when in first person
|
|
|
|
|
2022-09-27 22:19:12 +00:00
|
|
|
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];
|
|
|
|
|
2023-04-01 09:25:11 +00:00
|
|
|
vr_weapon_adjustment_t weaponadjustment[32];
|
|
|
|
char weaponadjustment_info[256]; // debug message for weapon alignment
|
|
|
|
|
2022-11-11 23:43:50 +00:00
|
|
|
int item_selector; // 1 - weapons/gadgets/saber stance, 2 - Force powers
|
2022-10-12 17:00:26 +00:00
|
|
|
|
2022-10-02 22:17:51 +00:00
|
|
|
bool velocitytriggered;
|
2023-05-21 21:38:42 +00:00
|
|
|
bool velocitytriggeractive;
|
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-11-07 23:57:10 +00:00
|
|
|
vec3_t secondaryVelocityTriggerLocation;
|
2022-09-18 15:37:21 +00:00
|
|
|
|
2023-02-26 09:45:41 +00:00
|
|
|
vec3_t offhandangles[ANGLES_COUNT];
|
|
|
|
vec3_t offhandangles_last[ANGLES_COUNT]; // Don't use this, it is just for calculating delta!
|
|
|
|
vec3_t offhandangles_delta[ANGLES_COUNT];
|
|
|
|
vec3_t offhandangles_saber[ANGLES_COUNT];
|
2022-09-18 15:37:21 +00:00
|
|
|
|
2022-11-21 21:56:59 +00:00
|
|
|
vec3_t offhandposition[5]; // store last 5
|
2022-09-18 15:37:21 +00:00
|
|
|
vec3_t offhandoffset;
|
|
|
|
|
2022-11-16 21:27:36 +00:00
|
|
|
float maxHeight;
|
|
|
|
float curHeight;
|
2023-03-05 08:48:31 +00:00
|
|
|
int useGestureState;
|
2023-04-01 16:48:42 +00:00
|
|
|
int useHapticFeedbackTime[2];
|
2022-11-16 21:27:36 +00:00
|
|
|
|
2022-09-18 15:37:21 +00:00
|
|
|
} vr_client_info_t;
|
|
|
|
|
2023-03-08 21:05:28 +00:00
|
|
|
#ifndef JKXR_CLIENT
|
2022-09-28 22:07:22 +00:00
|
|
|
extern vr_client_info_t *vr;
|
|
|
|
#endif
|
|
|
|
|
2023-04-03 20:55:29 +00:00
|
|
|
#endif //vr_client_info_h
|