Merge pull request #16 from petr666/feature/backports
Feature/backports
7
.gitignore
vendored
|
@ -26,7 +26,7 @@ $RECYCLE.BIN/
|
|||
*.apk
|
||||
*.ap_
|
||||
*.class
|
||||
projects/Android/build/*
|
||||
Projects/Android/build/*
|
||||
assets/oculussig*
|
||||
Projects/Android/.cxx/*
|
||||
*.json
|
||||
|
@ -36,10 +36,9 @@ Projects/Android/.gradle/*
|
|||
Projects/Android/.idea/*
|
||||
Projects/Android/.externalNativeBuild/*
|
||||
drbeef-release-key.keystore
|
||||
assets/pak6.pak
|
||||
Projects/Android/Android.iml
|
||||
Projects/Projects.iml
|
||||
assets/pak0.pk3
|
||||
assets/sp_pak_weapons.pk3
|
||||
assets/z_zvr_weapons.pk3
|
||||
assets/sp_vpak8.pk3
|
||||
assets/z_zvr_weapons.pk3
|
||||
assets/z_vr_assets.pk3
|
||||
|
|
|
@ -57,4 +57,14 @@ buildscript {
|
|||
repositories {
|
||||
google()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task packResources(type: Zip) {
|
||||
from "./z_vr_assets/"
|
||||
destinationDir file("../../assets/")
|
||||
archiveName "z_vr_assets.pk3"
|
||||
}
|
||||
|
||||
tasks.matching {it.name.startsWith("assemble")}.all { Task task ->
|
||||
task.dependsOn(packResources)
|
||||
}
|
||||
|
|
|
@ -855,6 +855,11 @@ void updateHMDOrientation()
|
|||
|
||||
//Keep this for our records
|
||||
VectorCopy(vr.hmdorientation, vr.hmdorientation_last);
|
||||
|
||||
// View yaw delta
|
||||
float clientview_yaw = vr.clientviewangles[YAW] - vr.hmdorientation[YAW];
|
||||
vr.clientview_yaw_delta = vr.clientview_yaw_last - clientview_yaw;
|
||||
vr.clientview_yaw_last = clientview_yaw;
|
||||
}
|
||||
|
||||
void setHMDPosition( float x, float y, float z )
|
||||
|
@ -905,7 +910,7 @@ void RTCWVR_Vibrate( int duration, int channel, float intensity )
|
|||
return;
|
||||
|
||||
vibration_channel_duration[channel] = duration;
|
||||
vibration_channel_intensity[channel] = intensity;
|
||||
vibration_channel_intensity[channel] = intensity * vr_haptic_intensity->value;
|
||||
}
|
||||
|
||||
void RTCWVR_Haptic( int duration, int channel, float intensity, char *description, float yaw, float height )
|
||||
|
@ -923,14 +928,20 @@ void RTCWVR_Haptic( int duration, int channel, float intensity, char *descriptio
|
|||
RTCWVR_HapticEvent("weapon_reload", channel == 1 ? 2 : 1, 0, 100.0f * intensity, 0, 0);
|
||||
}
|
||||
else if(strcmp(description,"door_open") == 0) {
|
||||
RTCWVR_HapticEvent("open_door", 0, 0, 100.0f * intensity, yaw, height);
|
||||
// Replaced by "use trigger" haptics
|
||||
// RTCWVR_HapticEvent("open_door", 0, 0, 100.0f * intensity, yaw, height);
|
||||
}
|
||||
else if(strcmp(description,"alarm_on") == 0) {
|
||||
RTCWVR_HapticEvent("heartbeat", 0, 0, 100.0f * intensity, yaw, height);
|
||||
// Replaced by "use trigger" haptics
|
||||
// RTCWVR_HapticEvent("heartbeat", 0, 0, 100.0f * intensity, yaw, height);
|
||||
}
|
||||
else if(strcmp(description,"end_alarm") == 0) {
|
||||
RTCWVR_HapticStopEvent("heartbeat");
|
||||
}
|
||||
// Replaced by "use trigger" haptics
|
||||
// RTCWVR_HapticStopEvent("heartbeat");
|
||||
}
|
||||
else if(strcmp(description,"use_trigger") == 0) {
|
||||
RTCWVR_HapticEvent("use_trigger", channel == 1 ? 2 : 1, 0, 100.0f * intensity, yaw, height);
|
||||
}
|
||||
else if(strcmp(description,"switch_weapon") == 0 || strcmp(description,"pickup_item") == 0) {
|
||||
RTCWVR_HapticEvent(description, channel == 1 ? 2 : 1, 0, 100.0f * intensity, 0, 0);
|
||||
}
|
||||
|
@ -1483,31 +1494,42 @@ void RTCWVR_Init()
|
|||
vr_turn_angle = Cvar_Get( "vr_turn_angle", "45", CVAR_ARCHIVE);
|
||||
vr_reloadtimeoutms = Cvar_Get( "vr_reloadtimeoutms", "200", CVAR_ARCHIVE);
|
||||
vr_positional_factor = Cvar_Get( "vr_positional_factor", "12", CVAR_ARCHIVE);
|
||||
vr_walkdirection = Cvar_Get( "vr_walkdirection", "0", CVAR_ARCHIVE);
|
||||
vr_walkdirection = Cvar_Get( "vr_walkdirection", "1", CVAR_ARCHIVE);
|
||||
vr_movement_multiplier = Cvar_Get( "vr_movement_multiplier", "0.7", CVAR_ARCHIVE);
|
||||
vr_weapon_pitchadjust = Cvar_Get( "vr_weapon_pitchadjust", "-20.0", CVAR_ARCHIVE);
|
||||
vr_lasersight = Cvar_Get( "vr_lasersight", "0", CVAR_ARCHIVE);
|
||||
vr_teleport = Cvar_Get( "vr_teleport", "0", CVAR_ARCHIVE);
|
||||
vr_virtual_stock = Cvar_Get( "vr_virtual_stock", "0", CVAR_ARCHIVE);
|
||||
vr_virtual_stock = Cvar_Get( "vr_virtual_stock", "0", CVAR_ARCHIVE);
|
||||
vr_comfort_vignette = Cvar_Get ("vr_comfort_vignette", "0.0", CVAR_ARCHIVE);
|
||||
vr_gesture_triggered_use = Cvar_Get ("vr_gesture_triggered_use", "1", CVAR_ARCHIVE);
|
||||
vr_use_gesture_boundary = Cvar_Get ("vr_use_gesture_boundary", "0.35", CVAR_ARCHIVE);
|
||||
vr_draw_hud = Cvar_Get ("vr_draw_hud", "1", CVAR_ARCHIVE);
|
||||
vr_irl_crouch_enabled = Cvar_Get ("vr_irl_crouch_enabled", "0", CVAR_ARCHIVE);
|
||||
vr_irl_crouch_to_stand_ratio = Cvar_Get ("vr_irl_crouch_to_stand_ratio", "0.65", CVAR_ARCHIVE);
|
||||
vr_haptic_intensity = Cvar_Get ("vr_haptic_intensity", "1.0", CVAR_ARCHIVE);
|
||||
vr_menu_item_touched = Cvar_Get ("vr_menu_item_touched", "0", CVAR_TEMP);
|
||||
vr_refresh = Cvar_Get ("vr_refresh", "72", CVAR_ARCHIVE);
|
||||
vr_spread_reduce = Cvar_Get ("vr_spread_reduce", "0.55", CVAR_ARCHIVE);
|
||||
|
||||
//Defaults
|
||||
vr_control_scheme = Cvar_Get( "vr_control_scheme", "0", CVAR_ARCHIVE);
|
||||
vr_switch_sticks = Cvar_Get( "vr_switch_sticks", "0", CVAR_ARCHIVE);
|
||||
|
||||
vr_cinematic_stereo = Cvar_Get( "vr_cinematic_stereo", "0", CVAR_ARCHIVE); // Default to 2D
|
||||
vr_screen_dist = Cvar_Get( "vr_screen_dist", "3.5", CVAR_ARCHIVE);
|
||||
vr_screen_dist = Cvar_Get( "vr_screen_dist", "4.4", CVAR_ARCHIVE);
|
||||
|
||||
//Set up vr client info
|
||||
vr.backpackitemactive = 0;
|
||||
vr.visible_hud = qtrue;
|
||||
vr.dualwield = qfalse;
|
||||
vr.weapon_recoil = 0.0f;
|
||||
vr.weapon_recoil = 0.0f;
|
||||
|
||||
//Clear teleport stuff
|
||||
vr.teleportexecute = qfalse;
|
||||
vr.teleportseek = qfalse;
|
||||
vr.teleportenabled = qfalse;
|
||||
vr.teleportready = qfalse;
|
||||
|
||||
vr.menu_right_handed = vr_control_scheme->integer == 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1629,6 +1651,14 @@ int GetRefresh()
|
|||
return vrapi_GetSystemPropertyInt(&java, VRAPI_SYS_PROP_DISPLAY_REFRESH_RATE);
|
||||
}
|
||||
|
||||
int GetRequestedRefresh() {
|
||||
float refresh = Cvar_VariableValue("vr_refresh");
|
||||
if (!refresh) {
|
||||
refresh = REFRESH;
|
||||
}
|
||||
return refresh;
|
||||
}
|
||||
|
||||
void * AppThreadFunction(void * parm ) {
|
||||
gAppThread = (ovrAppThread *) parm;
|
||||
|
||||
|
@ -1763,7 +1793,7 @@ void RTCWVR_FrameSetup()
|
|||
vrapi_SetTrackingSpace(gAppState.Ovr, VRAPI_TRACKING_SPACE_LOCAL_FLOOR);
|
||||
|
||||
//Set framerate so VrApi doesn't change it on us..
|
||||
vrapi_SetDisplayRefreshRate(gAppState.Ovr, REFRESH);
|
||||
vrapi_SetDisplayRefreshRate(gAppState.Ovr, GetRequestedRefresh());
|
||||
|
||||
vrapi_SetExtraLatencyMode(gAppState.Ovr, VRAPI_EXTRA_LATENCY_MODE_ON);
|
||||
}
|
||||
|
@ -1841,6 +1871,13 @@ void RTCWVR_getHMDOrientation() {//Get orientation
|
|||
|
||||
updateHMDOrientation();
|
||||
|
||||
// Max-height is set only once on start, or after re-calibration
|
||||
// (ignore too low value which is sometimes provided on start)
|
||||
if (!vr.maxHeight || vr.maxHeight < 1.0) {
|
||||
vr.maxHeight = positionHmd.y;
|
||||
}
|
||||
vr.curHeight = positionHmd.y;
|
||||
|
||||
ALOGV(" HMD-Position: %f, %f, %f", positionHmd.x, positionHmd.y, positionHmd.z);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,14 +4,17 @@
|
|||
#define NUM_WEAPON_SAMPLES 10
|
||||
#define WEAPON_RECOIL 15.0f;
|
||||
|
||||
#define ACTIVE_OFF_HAND 1
|
||||
#define ACTIVE_WEAPON_HAND 2
|
||||
|
||||
typedef struct {
|
||||
qboolean screen;
|
||||
float fov;
|
||||
qboolean weapon_stabilised;
|
||||
qboolean right_handed;
|
||||
qboolean menu_right_handed;
|
||||
qboolean player_moving;
|
||||
qboolean visible_hud;
|
||||
qboolean dualwield;
|
||||
int weaponid;
|
||||
int lastweaponid;
|
||||
int backpackitemactive; //0 - nothing, 1 - grenades, 2 - knife, 3 - Binoculars
|
||||
|
@ -29,6 +32,7 @@ typedef struct {
|
|||
vec3_t weaponangles;
|
||||
vec3_t weaponangles_last; // Don't use this, it is just for calculating delta!
|
||||
vec3_t weaponangles_delta;
|
||||
vec3_t dominanthandangles;
|
||||
|
||||
float weapon_recoil; // recoil effect to improve the default
|
||||
|
||||
|
@ -50,12 +54,17 @@ typedef struct {
|
|||
|
||||
qboolean velocitytriggered; // Weapon attack triggered by velocity (knife)
|
||||
|
||||
vec3_t offhandweaponangles;
|
||||
vec3_t offhandangles;
|
||||
vec3_t offhandangles_last; // Don't use this, it is just for calculating delta!
|
||||
vec3_t offhandangles_delta;
|
||||
|
||||
vec3_t offhandoffset;
|
||||
|
||||
vec3_t clientviewangles; //orientation in the client - we use this in the cgame
|
||||
float clientview_yaw_last; // Don't use this, it is just for calculating delta!
|
||||
float clientview_yaw_delta;
|
||||
|
||||
//
|
||||
// Teleport Stuff
|
||||
//
|
||||
|
@ -65,7 +74,18 @@ typedef struct {
|
|||
vec3_t teleportdest; // teleport destination
|
||||
qboolean teleportexecute; // execute the teleport
|
||||
|
||||
|
||||
int useGestureState;
|
||||
int wheelSelectorEnabled;
|
||||
qboolean binocularsActive;
|
||||
qboolean useHoldableItem;
|
||||
qboolean toggleMainMenu;
|
||||
int akimboTriggerState;
|
||||
qboolean akimboFire;
|
||||
qboolean vrIrlCrouchEnabled;
|
||||
float vrIrlCrouchToStandRatio;
|
||||
float viewHeight;
|
||||
float maxHeight;
|
||||
float curHeight;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Test stuff for weapon alignment
|
||||
|
|
|
@ -53,8 +53,9 @@ qboolean between(float min, float val, float max);
|
|||
void rotateAboutOrigin(float v1, float v2, float rotation, vec2_t out);
|
||||
void QuatToYawPitchRoll(ovrQuatf q, vec3_t rotation, vec3_t out);
|
||||
void handleTrackedControllerButton(ovrInputStateTrackedRemote * trackedRemoteState, ovrInputStateTrackedRemote * prevTrackedRemoteState, uint32_t button, int key);
|
||||
void interactWithTouchScreen(qboolean reset, ovrInputStateTrackedRemote *newState, ovrInputStateTrackedRemote *oldState);
|
||||
void interactWithTouchScreen(float menuYaw, vec3_t controllerAngles);
|
||||
int GetRefresh();
|
||||
int GetRequestedRefresh();
|
||||
|
||||
//Called from engine code
|
||||
qboolean RTCWVR_useScreenLayer();
|
||||
|
|
|
@ -119,7 +119,7 @@ static ovrMatrix4f CylinderModelMatrix( const int texWidth, const int texHeight,
|
|||
const float radius,
|
||||
const float density )
|
||||
{
|
||||
const ovrMatrix4f scaleMatrix = ovrMatrix4f_CreateScale( radius, radius * (float)texHeight * VRAPI_PI / density, radius );
|
||||
const ovrMatrix4f scaleMatrix = ovrMatrix4f_CreateScale( radius, radius * (float)texHeight * VRAPI_PI / density, radius / 2 );
|
||||
const ovrMatrix4f transMatrix = ovrMatrix4f_CreateTranslation( translation.x, translation.y, translation.z );
|
||||
const ovrMatrix4f rotXMatrix = ovrMatrix4f_CreateRotation( rotateYaw, 0.0f, 0.0f );
|
||||
const ovrMatrix4f rotYMatrix = ovrMatrix4f_CreateRotation( 0.0f, rotatePitch, 0.0f );
|
||||
|
@ -151,18 +151,10 @@ ovrLayerCylinder2 BuildCylinderLayer( ovrRenderer * cylinderRenderer,
|
|||
|
||||
layer.HeadPose = tracking->HeadPose;
|
||||
|
||||
const float density = 4500.0f;
|
||||
const float density = 15000.0f;
|
||||
const float rotateYaw = 0.0f;
|
||||
const float radius = 4.0f;
|
||||
//GB Hacky Override
|
||||
float screen_offset = 0;
|
||||
if(textureWidth > 1900)
|
||||
{
|
||||
screen_offset = -2.625f;
|
||||
}
|
||||
const float distance = vr_screen_dist ? -vr_screen_dist->value + screen_offset : -3.5f + screen_offset;
|
||||
|
||||
const ovrVector3f translation = { 0.0f, playerHeight/2, distance };
|
||||
const float radius = 10.0f;
|
||||
const ovrVector3f translation = { 0.0f, playerHeight/1.8f, -vr_screen_dist->value };
|
||||
|
||||
ovrMatrix4f cylinderTransform =
|
||||
CylinderModelMatrix( textureWidth, textureHeight, translation,
|
||||
|
|
|
@ -9,7 +9,16 @@ cvar_t *vr_lasersight;
|
|||
cvar_t *vr_control_scheme;
|
||||
cvar_t *vr_teleport;
|
||||
cvar_t *vr_virtual_stock;
|
||||
cvar_t *vr_comfort_vignette;
|
||||
cvar_t *vr_switch_sticks;
|
||||
cvar_t *vr_cinematic_stereo;
|
||||
cvar_t *vr_screen_dist;
|
||||
|
||||
cvar_t *vr_gesture_triggered_use;
|
||||
cvar_t *vr_use_gesture_boundary;
|
||||
cvar_t *vr_draw_hud;
|
||||
cvar_t *vr_irl_crouch_enabled;
|
||||
cvar_t *vr_irl_crouch_to_stand_ratio;
|
||||
cvar_t *vr_haptic_intensity;
|
||||
cvar_t *vr_menu_item_touched;
|
||||
cvar_t *vr_refresh;
|
||||
cvar_t *vr_spread_reduce;
|
||||
|
|
|
@ -171,20 +171,9 @@ inline float clamp(float _min, float _val, float _max)
|
|||
return max(min(_val, _max), _min);
|
||||
}
|
||||
|
||||
void interactWithTouchScreen(qboolean reset, ovrInputStateTrackedRemote *newState, ovrInputStateTrackedRemote *oldState) {
|
||||
static float cursorX = 0.25f;
|
||||
static float cursorY = 0.125f;
|
||||
|
||||
if (reset)
|
||||
{
|
||||
cursorX = 0.25f;
|
||||
cursorY = 0.125f;
|
||||
}
|
||||
|
||||
cursorX += (float)(vr.weaponangles_delta[YAW] / 180.0);
|
||||
cursorX = clamp(0.0, cursorX, 0.5);
|
||||
cursorY += (float)(-vr.weaponangles_delta[PITCH] / 220.0);
|
||||
cursorY = clamp(0.0, cursorY, 0.4);
|
||||
void interactWithTouchScreen(float menuYaw, vec3_t controllerAngles) {
|
||||
float cursorX = -sinf(DEG2RAD(controllerAngles[YAW] - menuYaw)) + 0.5f;
|
||||
float cursorY = (float)((controllerAngles[PITCH] - 15) / 90.0) + 0.5f;
|
||||
|
||||
PortableMouseAbs(cursorX, cursorY);
|
||||
}
|
|
@ -20,8 +20,16 @@ Authors : Simon Brown
|
|||
#include <src/qcommon/qcommon.h>
|
||||
#include <src/client/client.h>
|
||||
|
||||
|
||||
#define WP_AKIMBO 20
|
||||
#define WP_KNIFE 1
|
||||
#define WP_LUGER 2
|
||||
#define WP_GRENADE_LAUNCHER 6
|
||||
#define WP_COLT 11
|
||||
#define WP_GRENADE_PINEAPPLE 14
|
||||
#define WP_SILENCER 19
|
||||
#define WP_AKIMBO 20
|
||||
#define WP_DYNAMITE 22
|
||||
#define WP_AKIMBO_MP40 23
|
||||
#define WP_AKIMBO_THOMPSON 24
|
||||
|
||||
void SV_Trace( trace_t *results, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int passEntityNum, int contentmask, int capsule );
|
||||
|
||||
|
@ -43,6 +51,9 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
vr_control_scheme->value == 99; // Always right-handed for weapon calibration
|
||||
|
||||
vr.teleportenabled = vr_teleport->integer != 0;
|
||||
vr.visible_hud = vr_draw_hud->integer;
|
||||
vr.vrIrlCrouchEnabled = vr_irl_crouch_enabled->integer != 0;
|
||||
vr.vrIrlCrouchToStandRatio = vr_irl_crouch_to_stand_ratio->value;
|
||||
|
||||
static qboolean dominantGripPushed = false;
|
||||
static float dominantGripPushTime = 0.0f;
|
||||
|
@ -52,14 +63,6 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
//Need this for the touch screen
|
||||
ovrTracking * pWeapon = pDominantTracking;
|
||||
ovrTracking * pOff = pOffTracking;
|
||||
if (vr.weaponid == WP_AKIMBO &&
|
||||
!vr.right_handed &&
|
||||
!RTCWVR_useScreenLayer())
|
||||
{
|
||||
//Revert to same weapon controls as right-handed if using akimbo
|
||||
pWeapon = pOffTracking;
|
||||
pOff = pDominantTracking;
|
||||
}
|
||||
|
||||
//All this to allow stick and button switching!
|
||||
ovrVector2f *pPrimaryJoystick;
|
||||
|
@ -107,44 +110,71 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
{
|
||||
//Set gun angles - We need to calculate all those we might need (including adjustments) for the client to then take its pick
|
||||
vec3_t rotation = {0};
|
||||
rotation[PITCH] = -25;
|
||||
QuatToYawPitchRoll(pDominantTracking->HeadPose.Pose.Orientation, rotation, vr.dominanthandangles);
|
||||
rotation[PITCH] = 30;
|
||||
QuatToYawPitchRoll(pWeapon->HeadPose.Pose.Orientation, rotation, vr.weaponangles_knife);
|
||||
rotation[PITCH] = vr_weapon_pitchadjust->value +
|
||||
(vr.pistol ? vr.weapon_recoil : 0.0f); // Our hacked recoil effect
|
||||
vr.weapon_recoil *= 0.8f; // quick reduction on synthetic recoil
|
||||
qboolean addRecoil = vr.pistol && (vr.weaponid != WP_AKIMBO || vr.akimboFire);
|
||||
rotation[PITCH] = vr_weapon_pitchadjust->value + (addRecoil ? vr.weapon_recoil : 0.0f); // Our hacked recoil effect
|
||||
QuatToYawPitchRoll(pWeapon->HeadPose.Pose.Orientation, rotation, vr.weaponangles);
|
||||
|
||||
VectorSubtract(vr.weaponangles_last, vr.weaponangles, vr.weaponangles_delta);
|
||||
VectorCopy(vr.weaponangles, vr.weaponangles_last);
|
||||
|
||||
ALOGV(" weaponangles_last: %f, %f, %f",
|
||||
vr.weaponangles_last[0], vr.weaponangles_last[1], vr.weaponangles_last[2]);
|
||||
ALOGV(" weaponangles_last: %f, %f, %f", vr.weaponangles_last[0], vr.weaponangles_last[1], vr.weaponangles_last[2]);
|
||||
|
||||
//GB Also set offhand angles just in case we want to use those.
|
||||
vec3_t rotation_off = {0};
|
||||
rotation_off[PITCH] = vr_weapon_pitchadjust->value;
|
||||
rotation_off[PITCH] = -25;
|
||||
QuatToYawPitchRoll(pOff->HeadPose.Pose.Orientation, rotation_off, vr.offhandangles);
|
||||
qboolean addRecoil_off = vr.pistol && (vr.weaponid != WP_AKIMBO || !vr.akimboFire);
|
||||
rotation_off[PITCH] = vr_weapon_pitchadjust->value + (addRecoil_off ? vr.weapon_recoil : 0.0f); // Our hacked recoil effect
|
||||
QuatToYawPitchRoll(pOff->HeadPose.Pose.Orientation, rotation_off, vr.offhandweaponangles);
|
||||
|
||||
VectorSubtract(vr.offhandangles_last, vr.offhandangles, vr.offhandangles_delta);
|
||||
VectorCopy(vr.offhandangles, vr.offhandangles_last);
|
||||
|
||||
vr.weapon_recoil *= 0.8f; // quick reduction on synthetic recoil
|
||||
}
|
||||
|
||||
//Menu button
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, ovrButton_Enter, K_ESCAPE);
|
||||
if (vr.toggleMainMenu) { // Menu toggled via wheel selector
|
||||
vr.toggleMainMenu = qfalse;
|
||||
Sys_QueEvent( 0, SE_KEY, K_ESCAPE, qtrue, 0, NULL );
|
||||
}
|
||||
|
||||
static qboolean resetCursor = qtrue;
|
||||
static float menuYaw = 0;
|
||||
if ( RTCWVR_useScreenLayer() )
|
||||
{
|
||||
interactWithTouchScreen(resetCursor, pDominantTrackedRemoteNew, pDominantTrackedRemoteOld);
|
||||
resetCursor = qfalse;
|
||||
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
bool controlsLeftHanded = vr_control_scheme->integer >= 10;
|
||||
if (controlsLeftHanded == vr.menu_right_handed) {
|
||||
interactWithTouchScreen(menuYaw, vr.offhandangles);
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, offButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
if ((pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) != (pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger) && (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger)) {
|
||||
vr.menu_right_handed = !vr.menu_right_handed;
|
||||
RTCWVR_Vibrate(40, vr.menu_right_handed ? 1 : 0, 0.5);
|
||||
}
|
||||
} else {
|
||||
interactWithTouchScreen(menuYaw, vr.dominanthandangles);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
if ((pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) != (pOffTrackedRemoteOld->Buttons & ovrButton_Trigger) && (pOffTrackedRemoteNew->Buttons & ovrButton_Trigger)) {
|
||||
vr.menu_right_handed = !vr.menu_right_handed;
|
||||
RTCWVR_Vibrate(40, vr.menu_right_handed ? 1 : 0, 0.5);
|
||||
}
|
||||
}
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, offButton2, K_ESCAPE);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton2, K_ESCAPE);
|
||||
if (vr_menu_item_touched->integer) {
|
||||
RTCWVR_Vibrate(40, vr.menu_right_handed ? 1 : 0, 0.5);
|
||||
Cvar_SetValue("vr_menu_item_touched", 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
resetCursor = qtrue;
|
||||
menuYaw = vr.hmdorientation[YAW];
|
||||
|
||||
float distance = sqrtf(powf(pOff->HeadPose.Pose.Position.x - pWeapon->HeadPose.Pose.Position.x, 2) +
|
||||
powf(pOff->HeadPose.Pose.Position.y - pWeapon->HeadPose.Pose.Position.y, 2) +
|
||||
|
@ -161,7 +191,12 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
float controllerYawHeading = 0.0f;
|
||||
//Turn on weapon stabilisation?
|
||||
qboolean stabilised = qfalse;
|
||||
if (!vr.pistol && // Don't stabilise pistols
|
||||
qboolean usingAkimbo = vr.weaponid == WP_AKIMBO || vr.weaponid == WP_AKIMBO_MP40 || vr.weaponid == WP_AKIMBO_THOMPSON;
|
||||
qboolean usingSingleHandWeapon = vr.weaponid == WP_KNIFE || vr.weaponid == WP_LUGER || vr.weaponid == WP_GRENADE_LAUNCHER ||
|
||||
vr.weaponid == WP_COLT || vr.weaponid == WP_GRENADE_PINEAPPLE || vr.weaponid == WP_SILENCER ||
|
||||
vr.weaponid == WP_DYNAMITE;
|
||||
qboolean usingBinoculars = vr.backpackitemactive == 3 || vr.binocularsActive;
|
||||
if (!usingAkimbo && !usingSingleHandWeapon && !usingBinoculars && // Don't stabilise dual guns, single hand weapons and binoculars
|
||||
(pOffTrackedRemoteNew->Buttons & ovrButton_GripTrigger) && (distance < STABILISATION_DISTANCE))
|
||||
{
|
||||
stabilised = qtrue;
|
||||
|
@ -206,7 +241,7 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
|
||||
|
||||
static qboolean binocularstate = qfalse;
|
||||
qboolean binocularsactive = (vr.hasbinoculars && vr.backpackitemactive == 3 &&
|
||||
qboolean binocularsactive = (vr.hasbinoculars && (vr.backpackitemactive == 3 || vr.binocularsActive) &&
|
||||
(distanceToHMD < BINOCULAR_ENGAGE_DISTANCE) &&
|
||||
(pDominantTracking->Status & (VRAPI_TRACKING_STATUS_POSITION_TRACKED | VRAPI_TRACKING_STATUS_POSITION_VALID)));
|
||||
if (binocularstate != binocularsactive)
|
||||
|
@ -236,6 +271,13 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
//Just copy to calculated offset, used to use this in case we wanted to apply any modifiers, but don't any more
|
||||
VectorCopy(vr.current_weaponoffset, vr.calculated_weaponoffset);
|
||||
|
||||
static qboolean wasVelocityTriggered = false;
|
||||
if (!wasVelocityTriggered && vr.velocitytriggered) {
|
||||
// In case we are switching from standard weapon to velocity triggered
|
||||
// weapon disable ongoing attack to prevent attack being stuck.
|
||||
sendButtonAction("+attack", false);
|
||||
}
|
||||
wasVelocityTriggered = vr.velocitytriggered;
|
||||
//Does weapon velocity trigger attack (knife) and is it fast enough
|
||||
static qboolean velocityTriggeredAttack = false;
|
||||
if (vr.velocitytriggered)
|
||||
|
@ -261,10 +303,9 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
sendButtonAction("+attack", velocityTriggeredAttack);
|
||||
}
|
||||
|
||||
if (vr.weapon_stabilised || vr.dualwield)
|
||||
if (vr.weapon_stabilised)
|
||||
{
|
||||
if (vr.scopeengaged || (vr_virtual_stock->integer == 1 && // Classic Virtual Stock
|
||||
!vr.dualwield))
|
||||
if (vr.scopeengaged || vr_virtual_stock->integer == 1)
|
||||
{
|
||||
//offset to the appropriate eye a little bit
|
||||
vec2_t xy;
|
||||
|
@ -287,16 +328,8 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
float zxDist = length(x, z);
|
||||
|
||||
if (zxDist != 0.0f && z != 0.0f) {
|
||||
if (vr.dualwield) {
|
||||
//SUPER FUDGE
|
||||
VectorSet(vr.weaponangles, vr.weaponangles[PITCH],
|
||||
-90.0f-degrees(atan2f(x, -z)), degrees(atanf(y / zxDist)));
|
||||
}
|
||||
else
|
||||
{
|
||||
VectorSet(vr.weaponangles, -degrees(atanf(y / zxDist)),
|
||||
-degrees(atan2f(x, -z)), vr.weaponangles[ROLL] / 2.0f); //Dampen roll on stabilised weapon
|
||||
}
|
||||
VectorSet(vr.weaponangles, -degrees(atanf(y / zxDist)),
|
||||
-degrees(atan2f(x, -z)), vr.weaponangles[ROLL] / 2.0f); //Dampen roll on stabilised weapon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -355,6 +388,7 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
vr.offhandoffset[2] = pOff->HeadPose.Pose.Position.z - vr.hmdposition[2];
|
||||
|
||||
vec3_t rotation = {0};
|
||||
rotation[PITCH] = -25;
|
||||
QuatToYawPitchRoll(pOff->HeadPose.Pose.Orientation, rotation, vr.offhandangles);
|
||||
|
||||
if (vr_walkdirection->value == 0) {
|
||||
|
@ -444,11 +478,18 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
if (dominantGripPushed) {
|
||||
if (dominantGripPushTime == 0) {
|
||||
dominantGripPushTime = GetTimeInMilliSeconds();
|
||||
} else if (!handInBackpack && !vr.backpackitemactive && !vr.mountedgun && !vr.scopeengaged && !vr.weapon_stabilised &&
|
||||
(GetTimeInMilliSeconds() - dominantGripPushTime) > vr_reloadtimeoutms->integer) {
|
||||
vr.wheelSelectorEnabled = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (vr.backpackitemactive == 1) {
|
||||
if (vr.wheelSelectorEnabled) {
|
||||
vr.wheelSelectorEnabled = false;
|
||||
sendButtonActionSimple("wheelselectorselect");
|
||||
}
|
||||
else if (vr.backpackitemactive == 1) {
|
||||
//Restores last used weapon if possible
|
||||
char buffer[32];
|
||||
sprintf(buffer, "weapon %i", vr.lastweaponid);
|
||||
|
@ -514,12 +555,13 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
//Positional movement speed correction for when we are not hitting target framerate
|
||||
static double lastframetime = 0;
|
||||
int refresh = GetRefresh();
|
||||
int requestedRefresh = GetRequestedRefresh();
|
||||
double newframetime = GetTimeInMilliSeconds();
|
||||
float multiplier = (float)((1000.0 / refresh) / (newframetime - lastframetime));
|
||||
lastframetime = newframetime;
|
||||
|
||||
vec2_t v;
|
||||
float factor = (refresh / 72.0F) * vr_positional_factor->value; // adjust positional factor based on refresh rate
|
||||
float factor = (refresh / requestedRefresh) * vr_positional_factor->value; // adjust positional factor based on refresh rate
|
||||
rotateAboutOrigin(-vr.hmdposition_delta[0] * factor * multiplier,
|
||||
vr.hmdposition_delta[2] * factor * multiplier, - vr.hmdorientation[YAW], v);
|
||||
positional_movementSideways = v[0];
|
||||
|
@ -541,65 +583,37 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
|
||||
|
||||
|
||||
//We need to record if we have started firing primary so that releasing trigger will stop firing, if user has pushed grip
|
||||
//in meantime, then it wouldn't stop the gun firing and it would get stuck
|
||||
static qboolean firing = false;
|
||||
if (dominantGripPushed && vr.backpackitemactive == 0)
|
||||
{
|
||||
if ((pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) !=
|
||||
(pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger))
|
||||
{
|
||||
if (!vr.scopedweapon) {
|
||||
if (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) {
|
||||
ALOGV("**WEAPON EVENT** weapalt");
|
||||
sendButtonActionSimple("weapalt");
|
||||
}
|
||||
else if (firing)
|
||||
{
|
||||
//no longer firing
|
||||
firing = qfalse;
|
||||
ALOGV("**WEAPON EVENT** Grip Pushed %sattack", (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) ? "+" : "-");
|
||||
//Fire Primary
|
||||
if (vr.backpackitemactive != 3 && !vr.binocularsActive && // Can't fire while holding binoculars
|
||||
!vr.velocitytriggered && // Don't fire velocity triggered weapons
|
||||
(pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) !=
|
||||
(pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger)) {
|
||||
|
||||
ALOGV("**WEAPON EVENT** Not Grip Pushed %sattack", (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) ? "+" : "-");
|
||||
qboolean firing = (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger);
|
||||
if (usingAkimbo) {
|
||||
if (firing) {
|
||||
vr.akimboTriggerState |= ACTIVE_WEAPON_HAND;
|
||||
sendButtonAction("+attack", firing);
|
||||
} else {
|
||||
vr.akimboTriggerState &= ~ACTIVE_WEAPON_HAND;
|
||||
if (!vr.akimboTriggerState) { // Stop firing only if we are not still firing with off-hand weapon
|
||||
sendButtonAction("+attack", firing);
|
||||
}
|
||||
}
|
||||
else if (vr.detachablescope)
|
||||
{
|
||||
if (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) {
|
||||
//See if we are able to detach the scope
|
||||
ALOGV("**WEAPON EVENT** weapdetachscope");
|
||||
sendButtonActionSimple("weapdetachscope");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Just ignore grip and fire
|
||||
firing = (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger);
|
||||
ALOGV("**WEAPON EVENT** Grip Pushed %sattack", (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) ? "+" : "-");
|
||||
sendButtonAction("+attack", firing);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Fire Primary
|
||||
if (vr.backpackitemactive != 3 && // Can't fire while holding binoculars
|
||||
!vr.velocitytriggered && // Don't fire velocity triggered weapons
|
||||
(pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) !=
|
||||
(pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger)) {
|
||||
|
||||
ALOGV("**WEAPON EVENT** Not Grip Pushed %sattack", (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) ? "+" : "-");
|
||||
firing = (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger);
|
||||
} else {
|
||||
vr.akimboTriggerState = 0;
|
||||
sendButtonAction("+attack", firing);
|
||||
}
|
||||
else if (binocularsactive) // trigger can zoom-in binoculars, remove from face to reset
|
||||
}
|
||||
else if (binocularsactive) // trigger can zoom-in binoculars, remove from face to reset
|
||||
{
|
||||
static qboolean zoomin = true;
|
||||
if (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) {
|
||||
sendButtonActionSimple(zoomin ? "weapnext" : "weapprev");
|
||||
} else if (pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger)
|
||||
{
|
||||
static qboolean zoomin = true;
|
||||
if (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) {
|
||||
sendButtonActionSimple(zoomin ? "weapnext" : "weapprev");
|
||||
} else if (pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger)
|
||||
{
|
||||
zoomin = !zoomin;
|
||||
}
|
||||
zoomin = !zoomin;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -610,21 +624,24 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
(primaryButtonsOld & primaryButton1)) {
|
||||
|
||||
sendButtonAction("+movedown", (primaryButtonsNew & primaryButton1));
|
||||
// Reset max height for IRL crouch
|
||||
vr.maxHeight = 0;
|
||||
}
|
||||
|
||||
//Weapon Chooser
|
||||
static qboolean itemSwitched = false;
|
||||
if (between(-0.2f, pPrimaryJoystick->x, 0.2f) &&
|
||||
(between(0.8f, pPrimaryJoystick->y, 1.0f) ||
|
||||
between(-1.0f, pPrimaryJoystick->y, -0.8f)))
|
||||
if (!vr.wheelSelectorEnabled && between(-0.2f, pPrimaryJoystick->x, 0.2f) &&
|
||||
(between(0.8f, pPrimaryJoystick->y, 1.0f) || between(-1.0f, pPrimaryJoystick->y, -0.8f)))
|
||||
{
|
||||
if (!itemSwitched) {
|
||||
if (between(0.8f, pPrimaryJoystick->y, 1.0f))
|
||||
{
|
||||
vr.binocularsActive = false;
|
||||
sendButtonActionSimple("weapprev");
|
||||
}
|
||||
else
|
||||
{
|
||||
vr.binocularsActive = false;
|
||||
sendButtonActionSimple("weapnext");
|
||||
}
|
||||
itemSwitched = true;
|
||||
|
@ -664,37 +681,46 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
|
||||
|
||||
static qboolean stopUseItemNextFrame = false;
|
||||
static qboolean startUseItemNextFrame = false;
|
||||
if (vr.useHoldableItem) // Item toggled via wheel selector
|
||||
{
|
||||
startUseItemNextFrame = true;
|
||||
vr.useHoldableItem = false;
|
||||
}
|
||||
if (startUseItemNextFrame)
|
||||
{
|
||||
Cbuf_AddText("+useitem\n");
|
||||
startUseItemNextFrame = qfalse;
|
||||
stopUseItemNextFrame = qtrue;
|
||||
}
|
||||
if (stopUseItemNextFrame)
|
||||
{
|
||||
Cbuf_AddText("-useitem\n");
|
||||
stopUseItemNextFrame = false;
|
||||
}
|
||||
|
||||
// Detach scopes, draw akimbo
|
||||
if (!canUseQuickSave) {
|
||||
if (((secondaryButtonsNew & secondaryButton1) !=
|
||||
(secondaryButtonsOld & secondaryButton1)) &&
|
||||
(secondaryButtonsNew & secondaryButton1)) {
|
||||
|
||||
if (dominantGripPushed) {
|
||||
Cbuf_AddText("+useitem\n");
|
||||
stopUseItemNextFrame = qtrue;
|
||||
} else {
|
||||
vr.visible_hud = !vr.visible_hud;
|
||||
if (!vr.scopedweapon) {
|
||||
ALOGV("**WEAPON EVENT** weapalt");
|
||||
sendButtonActionSimple("weapalt");
|
||||
} else if (vr.detachablescope) {
|
||||
//See if we are able to detach the scope
|
||||
ALOGV("**WEAPON EVENT** weapdetachscope");
|
||||
sendButtonActionSimple("weapdetachscope");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//notebook or select "item"
|
||||
// Notebook
|
||||
if (!canUseQuickSave) {
|
||||
if (((secondaryButtonsNew & secondaryButton2) !=
|
||||
(secondaryButtonsOld & secondaryButton2)) &&
|
||||
(secondaryButtonsNew & secondaryButton2)) {
|
||||
|
||||
if (dominantGripPushed) {
|
||||
sendButtonActionSimple("itemprev");
|
||||
} else {
|
||||
sendButtonActionSimple("notebook");
|
||||
}
|
||||
sendButtonActionSimple("notebook");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -707,13 +733,44 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
|
||||
//We need to record if we have started firing primary so that releasing trigger will stop definitely firing, if user has pushed grip
|
||||
//in meantime, then it wouldn't stop the gun firing and it would get stuck
|
||||
if (!vr.teleportenabled)
|
||||
if (!vr.teleportenabled || usingAkimbo)
|
||||
{
|
||||
//Run
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew,
|
||||
pOffTrackedRemoteOld,
|
||||
ovrButton_Trigger, K_SHIFT);
|
||||
|
||||
if ((usingAkimbo) && vr.backpackitemactive != 3 && !vr.binocularsActive) {
|
||||
// Fire off-hand weapon
|
||||
if ((pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) != (pOffTrackedRemoteOld->Buttons & ovrButton_Trigger)) {
|
||||
ALOGV("**WEAPON EVENT** Off-hand trigger %sattack", (pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) ? "+" : "-");
|
||||
qboolean firing = (pOffTrackedRemoteNew->Buttons & ovrButton_Trigger);
|
||||
if (firing) {
|
||||
vr.akimboTriggerState |= ACTIVE_OFF_HAND;
|
||||
sendButtonAction("+attack", firing);
|
||||
} else {
|
||||
vr.akimboTriggerState &= ~ACTIVE_OFF_HAND;
|
||||
if (!vr.akimboTriggerState) { // Stop firing only if we are not still firing with main weapon
|
||||
sendButtonAction("+attack", firing);
|
||||
}
|
||||
}
|
||||
}
|
||||
// When holding off-hand weapon, run (or teleport) with left grip
|
||||
if (!vr.teleportenabled) {
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, ovrButton_GripTrigger, K_SHIFT);
|
||||
} else {
|
||||
if (pOffTrackedRemoteNew->Buttons & ovrButton_GripTrigger) {
|
||||
vr.teleportseek = qtrue;
|
||||
} else if (vr.teleportseek) {
|
||||
vr.teleportseek = qfalse;
|
||||
vr.teleportexecute = vr.teleportready;
|
||||
vr.teleportready = qfalse;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (vr.akimboTriggerState) {
|
||||
// Akimbo no longer active, stop attacking
|
||||
vr.akimboTriggerState = 0;
|
||||
sendButtonAction("+attack", qfalse);
|
||||
}
|
||||
// Run
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, ovrButton_Trigger, K_SHIFT);
|
||||
}
|
||||
} else {
|
||||
if (pOffTrackedRemoteNew->Buttons & ovrButton_Trigger)
|
||||
{
|
||||
|
@ -736,62 +793,78 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
usingMountedGun = vr.mountedgun;
|
||||
}
|
||||
|
||||
//No snap turn when using mounted gun
|
||||
static int syncCount = 0;
|
||||
static int increaseSnap = true;
|
||||
if (!vr.mountedgun && !vr.scopeengaged) {
|
||||
if (pPrimaryJoystick->x > 0.7f) {
|
||||
if (increaseSnap) {
|
||||
float turnAngle = vr_turn_mode->integer ? (vr_turn_angle->value / 9.0f) : vr_turn_angle->value;
|
||||
snapTurn -= turnAngle;
|
||||
|
||||
if (vr_turn_mode->integer == 0) {
|
||||
increaseSnap = false;
|
||||
}
|
||||
|
||||
if (snapTurn < -180.0f) {
|
||||
snapTurn += 360.f;
|
||||
}
|
||||
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
if (vr.wheelSelectorEnabled) {
|
||||
static int wheelSelectorSwitched = false;
|
||||
if (between(0.8f, pPrimaryJoystick->x, 1.0f) || between(-1.0f, pPrimaryJoystick->x, -0.8f)) {
|
||||
if (!wheelSelectorSwitched) {
|
||||
if (between(0.8f, pPrimaryJoystick->x, 1.0f)) {
|
||||
sendButtonActionSimple("wheelselectornext");
|
||||
} else {
|
||||
sendButtonActionSimple("wheelselectorprev");
|
||||
}
|
||||
wheelSelectorSwitched = true;
|
||||
}
|
||||
} else if (pPrimaryJoystick->x < 0.3f) {
|
||||
increaseSnap = true;
|
||||
} else {
|
||||
wheelSelectorSwitched = false;
|
||||
}
|
||||
} else {
|
||||
//No snap turn when using mounted gun
|
||||
static int syncCount = 0;
|
||||
static int increaseSnap = true;
|
||||
if (!vr.mountedgun && !vr.scopeengaged) {
|
||||
if (pPrimaryJoystick->x > 0.7f) {
|
||||
if (increaseSnap) {
|
||||
float turnAngle = vr_turn_mode->integer ? (vr_turn_angle->value / 9.0f) : vr_turn_angle->value;
|
||||
snapTurn -= turnAngle;
|
||||
|
||||
static int decreaseSnap = true;
|
||||
if (pPrimaryJoystick->x < -0.7f) {
|
||||
if (decreaseSnap) {
|
||||
if (vr_turn_mode->integer == 0) {
|
||||
increaseSnap = false;
|
||||
}
|
||||
|
||||
float turnAngle = vr_turn_mode->integer ? (vr_turn_angle->value / 9.0f) : vr_turn_angle->value;
|
||||
snapTurn += turnAngle;
|
||||
if (snapTurn < -180.0f) {
|
||||
snapTurn += 360.f;
|
||||
}
|
||||
|
||||
//If snap turn configured for less than 10 degrees
|
||||
if (vr_turn_mode->integer == 0) {
|
||||
decreaseSnap = false;
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
}
|
||||
|
||||
if (snapTurn > 180.0f) {
|
||||
snapTurn -= 360.f;
|
||||
}
|
||||
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
} else if (pPrimaryJoystick->x < 0.3f) {
|
||||
increaseSnap = true;
|
||||
}
|
||||
|
||||
static int decreaseSnap = true;
|
||||
if (pPrimaryJoystick->x < -0.7f) {
|
||||
if (decreaseSnap) {
|
||||
|
||||
float turnAngle = vr_turn_mode->integer ? (vr_turn_angle->value / 9.0f) : vr_turn_angle->value;
|
||||
snapTurn += turnAngle;
|
||||
|
||||
//If snap turn configured for less than 10 degrees
|
||||
if (vr_turn_mode->integer == 0) {
|
||||
decreaseSnap = false;
|
||||
}
|
||||
|
||||
if (snapTurn > 180.0f) {
|
||||
snapTurn -= 360.f;
|
||||
}
|
||||
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
}
|
||||
} else if (pPrimaryJoystick->x > -0.3f) {
|
||||
decreaseSnap = true;
|
||||
}
|
||||
} else if (pPrimaryJoystick->x > -0.3f) {
|
||||
decreaseSnap = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (fabs(pPrimaryJoystick->x) > 0.5f) {
|
||||
if (increaseSnap)
|
||||
else {
|
||||
if (fabs(pPrimaryJoystick->x) > 0.5f) {
|
||||
if (increaseSnap)
|
||||
{
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
}
|
||||
increaseSnap = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
increaseSnap = true;
|
||||
}
|
||||
increaseSnap = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
increaseSnap = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -799,6 +872,46 @@ void HandleInput_Default( ovrInputStateGamepad *pFootTrackingNew, ovrInputStateG
|
|||
updateScopeAngles();
|
||||
}
|
||||
|
||||
// Process "use" gesture
|
||||
if (vr_gesture_triggered_use->integer) {
|
||||
int thirdPersonActive = Cvar_VariableIntegerValue("cg_thirdPerson");
|
||||
bool gestureUseAllowed = !vr.weapon_stabilised && !vr.mountedgun && !vr.scopeengaged && !vr.wheelSelectorEnabled && !thirdPersonActive;
|
||||
// Off-hand gesture
|
||||
float distanceToBody = sqrt(vr.offhandoffset[0]*vr.offhandoffset[0] + vr.offhandoffset[2]*vr.offhandoffset[2]);
|
||||
if (gestureUseAllowed && (distanceToBody > vr_use_gesture_boundary->value)) {
|
||||
if (!(vr.useGestureState & ACTIVE_OFF_HAND)) {
|
||||
sendButtonAction("+activate2", true);
|
||||
}
|
||||
vr.useGestureState |= ACTIVE_OFF_HAND;
|
||||
} else {
|
||||
if (vr.useGestureState & ACTIVE_OFF_HAND) {
|
||||
sendButtonAction("+activate2", false);
|
||||
}
|
||||
vr.useGestureState &= ~ACTIVE_OFF_HAND;
|
||||
}
|
||||
// Weapon-hand gesture
|
||||
distanceToBody = sqrt(vr.current_weaponoffset[0]*vr.current_weaponoffset[0] + vr.current_weaponoffset[2]*vr.current_weaponoffset[2]);
|
||||
if (gestureUseAllowed && (distanceToBody > vr_use_gesture_boundary->value)) {
|
||||
if (!(vr.useGestureState & ACTIVE_WEAPON_HAND)) {
|
||||
sendButtonAction("+activate", true);
|
||||
}
|
||||
vr.useGestureState |= ACTIVE_WEAPON_HAND;
|
||||
} else {
|
||||
if (vr.useGestureState & ACTIVE_WEAPON_HAND) {
|
||||
sendButtonAction("+activate", false);
|
||||
}
|
||||
vr.useGestureState &= ~ACTIVE_WEAPON_HAND;
|
||||
}
|
||||
} else {
|
||||
if (vr.useGestureState & ACTIVE_OFF_HAND) {
|
||||
sendButtonAction("+activate2", false);
|
||||
}
|
||||
if (vr.useGestureState & ACTIVE_WEAPON_HAND) {
|
||||
sendButtonAction("+activate", false);
|
||||
}
|
||||
vr.useGestureState = 0;
|
||||
}
|
||||
|
||||
//Save state
|
||||
rightTrackedRemoteState_old = rightTrackedRemoteState_new;
|
||||
leftTrackedRemoteState_old = leftTrackedRemoteState_new;
|
||||
|
|
|
@ -64,19 +64,32 @@ void HandleInput_WeaponAlign( ovrInputStateTrackedRemote *pDominantTrackedRemote
|
|||
//Menu button
|
||||
handleTrackedControllerButton(&leftTrackedRemoteState_new, &leftTrackedRemoteState_old, ovrButton_Enter, K_ESCAPE);
|
||||
|
||||
static qboolean resetCursor = qtrue;
|
||||
static float menuYaw = 0;
|
||||
static bool switchedMenuControls = qfalse;
|
||||
if ( RTCWVR_useScreenLayer() )
|
||||
{
|
||||
interactWithTouchScreen(resetCursor, pDominantTrackedRemoteNew, pDominantTrackedRemoteOld);
|
||||
resetCursor = qfalse;
|
||||
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton2, K_ESCAPE);
|
||||
bool controlsLeftHanded = vr_control_scheme->integer >= 10;
|
||||
if ((controlsLeftHanded && !switchedMenuControls) || (!controlsLeftHanded && switchedMenuControls)) {
|
||||
interactWithTouchScreen(menuYaw, vr.offhandangles);
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, offButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
handleTrackedControllerButton(pOffTrackedRemoteNew, pOffTrackedRemoteOld, offButton2, K_ESCAPE);
|
||||
if ((pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger) != (pDominantTrackedRemoteOld->Buttons & ovrButton_Trigger) && (pDominantTrackedRemoteNew->Buttons & ovrButton_Trigger)) {
|
||||
switchedMenuControls = !switchedMenuControls;
|
||||
}
|
||||
} else {
|
||||
interactWithTouchScreen(menuYaw, vr.weaponangles);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton1, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, ovrButton_Trigger, K_MOUSE1);
|
||||
handleTrackedControllerButton(pDominantTrackedRemoteNew, pDominantTrackedRemoteOld, domButton2, K_ESCAPE);
|
||||
if ((pOffTrackedRemoteNew->Buttons & ovrButton_Trigger) != (pOffTrackedRemoteOld->Buttons & ovrButton_Trigger) && (pOffTrackedRemoteNew->Buttons & ovrButton_Trigger)) {
|
||||
switchedMenuControls = !switchedMenuControls;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
resetCursor = qtrue;
|
||||
menuYaw = vr.hmdorientation[YAW];
|
||||
|
||||
//dominant hand stuff first
|
||||
{
|
||||
|
|
|
@ -228,11 +228,8 @@ int absx=0,absy=0;
|
|||
RTCWVR_GetScreenRes(int *width, int *height);
|
||||
void PortableMouseAbs(float x,float y)
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
RTCWVR_GetScreenRes(&width, &height);
|
||||
absx = x * width;
|
||||
absy = y * height;
|
||||
absx = x * 640;
|
||||
absy = y * 480;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -416,6 +416,10 @@ typedef struct {
|
|||
void ( *function )( void );
|
||||
} consoleCommand_t;
|
||||
|
||||
void CG_WheelSelectorSelect_f( void );
|
||||
void CG_WheelSelectorNext_f( void );
|
||||
void CG_WheelSelectorPrev_f( void );
|
||||
|
||||
static consoleCommand_t commands[] = {
|
||||
{ "testgun", CG_TestGun_f },
|
||||
{ "testmodel", CG_TestModel_f },
|
||||
|
@ -453,6 +457,9 @@ static consoleCommand_t commands[] = {
|
|||
{ "loaddeferred", CG_LoadDeferredPlayers }, // spelling fixed (SA)
|
||||
{ "camera", CG_Camera_f }, // duffy
|
||||
{ "fade", CG_Fade_f }, // duffy
|
||||
{ "wheelselectorselect", CG_WheelSelectorSelect_f },
|
||||
{ "wheelselectornext", CG_WheelSelectorNext_f },
|
||||
{ "wheelselectorprev", CG_WheelSelectorPrev_f },
|
||||
|
||||
// NERVE - SMF
|
||||
{ "mp_QuickMessage", CG_QuickMessage_f },
|
||||
|
|
|
@ -3389,7 +3389,82 @@ static void CG_ScreenFade( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==============
|
||||
CG_DrawVignette
|
||||
==============
|
||||
*/
|
||||
float currentComfortVignetteValue = 0.0f;
|
||||
float filteredViewYawDelta = 0.0f;
|
||||
|
||||
static void CG_DrawVignette( void )
|
||||
{
|
||||
playerState_t *ps;
|
||||
ps = &cg.snap->ps;
|
||||
|
||||
float vr_comfort_vignette = 0;
|
||||
char buf[32];
|
||||
trap_Cvar_VariableStringBuffer("vr_comfort_vignette", buf, sizeof(buf)); // defined in VrCvars.h
|
||||
vr_comfort_vignette = atof(buf);
|
||||
if (vr_comfort_vignette <= 0.0f || vr_comfort_vignette > 1.0f || cg.zoomedScope || cg.zoomedBinoc)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
qboolean isMoving = VectorLength(cg.predictedPlayerState.velocity) > 30.0;
|
||||
// When player is in the air, apply vignette (to prevent throbbing on top of jump)
|
||||
qboolean isInAir = ps->groundEntityNum == ENTITYNUM_NONE;
|
||||
int vr_turn_mode = trap_Cvar_VariableIntegerValue("vr_turn_mode"); // defined in VrCvars.h
|
||||
// Apply only for smooth turn
|
||||
qboolean isTurning = (vr_turn_mode == 2);
|
||||
if (isTurning) {
|
||||
float yawDelta = fabsf(cgVR->clientview_yaw_delta);
|
||||
if (yawDelta > 180)
|
||||
{
|
||||
yawDelta = fabs(yawDelta - 360);
|
||||
}
|
||||
filteredViewYawDelta = filteredViewYawDelta * 0.75f + yawDelta * 0.25f;
|
||||
isTurning = filteredViewYawDelta > 1;
|
||||
}
|
||||
|
||||
if (isMoving || isInAir || isTurning)
|
||||
{
|
||||
if (currentComfortVignetteValue < vr_comfort_vignette)
|
||||
{
|
||||
currentComfortVignetteValue += vr_comfort_vignette * 0.05;
|
||||
if (currentComfortVignetteValue > 1.0f)
|
||||
currentComfortVignetteValue = 1.0f;
|
||||
}
|
||||
} else{
|
||||
if (currentComfortVignetteValue > 0.0f)
|
||||
currentComfortVignetteValue -= vr_comfort_vignette * 0.05;
|
||||
}
|
||||
|
||||
if (currentComfortVignetteValue > 0.0f && currentComfortVignetteValue <= 1.0f)
|
||||
{
|
||||
int screenWidth = cg.refdef.width;
|
||||
int screenHeight = cg.refdef.height;
|
||||
|
||||
int x = (int)(0 + currentComfortVignetteValue * screenWidth / 3.5f);
|
||||
int w = (int)(screenWidth - 2 * x);
|
||||
int y = (int)(0 + currentComfortVignetteValue * screenHeight / 3.5f);
|
||||
int h = (int)(screenHeight - 2 * y);
|
||||
|
||||
vec4_t black = {0.0, 0.0, 0.0, 1};
|
||||
trap_R_SetColor( black );
|
||||
|
||||
// sides
|
||||
trap_R_DrawStretchPic( 0, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
|
||||
trap_R_DrawStretchPic( screenWidth - x, 0, x, screenHeight, 0, 0, 1, 1, cgs.media.whiteShader );
|
||||
// top/bottom
|
||||
trap_R_DrawStretchPic( x, 0, screenWidth - x, y, 0, 0, 1, 1, cgs.media.whiteShader );
|
||||
trap_R_DrawStretchPic( x, screenHeight - y, screenWidth - x, y, 0, 0, 1, 1, cgs.media.whiteShader );
|
||||
// vignette
|
||||
trap_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader );
|
||||
|
||||
trap_R_SetColor( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -3430,6 +3505,8 @@ static void CG_Draw2D( void ) {
|
|||
// don't draw any status if dead
|
||||
if ( cg.snap->ps.stats[STAT_HEALTH] > 0 ) {
|
||||
|
||||
CG_DrawVignette();
|
||||
|
||||
if (cg.zoomedScope || cg.zoomedBinoc || ( cg.snap->ps.eFlags & EF_MG42_ACTIVE )) {
|
||||
CG_DrawCrosshair();
|
||||
}
|
||||
|
|
|
@ -275,6 +275,12 @@ static void CG_Obituary( entityState_t *ent ) {
|
|||
case MOD_AKIMBO:
|
||||
message = "was killed (dual colts) by";
|
||||
break;
|
||||
case MOD_AKIMBO_MP40:
|
||||
message = "was killed (dual MP40) by";
|
||||
break;
|
||||
case MOD_AKIMBO_THOMPSON:
|
||||
message = "was killed (dual thompson) by";
|
||||
break;
|
||||
case MOD_ROCKET_LAUNCHER:
|
||||
message = "was killed (rl) by";
|
||||
break;
|
||||
|
@ -446,9 +452,10 @@ static void CG_ItemPickup( int itemNum ) {
|
|||
|
||||
weapon = itemid;
|
||||
|
||||
if ( weapon == WP_COLT ) {
|
||||
if ( COM_BitCheck( cg.snap->ps.weapons, weapon ) ) {
|
||||
weapon = WP_AKIMBO; // you have colt, now get akimbo (second)
|
||||
if ( weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON ) {
|
||||
int altWeapon = weapAlts[weapon];
|
||||
if ( COM_BitCheck( cg.snap->ps.weapons, weapon ) && COM_BitCheck( cg.predictedPlayerState.weapons, altWeapon ) ) {
|
||||
weapon = altWeapon; // you have one, now get akimbo (second)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -525,6 +532,9 @@ static void CG_ItemPickup( int itemNum ) {
|
|||
if ( selectIt ) {
|
||||
cg.weaponSelectTime = cg.time;
|
||||
cg.weaponSelect = weapon;
|
||||
if (cgVR) {
|
||||
cgVR->weaponid = weapon;
|
||||
}
|
||||
}
|
||||
|
||||
} // end bg_itemlist[itemNum].giType == IT_WEAPON
|
||||
|
@ -1947,6 +1957,9 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
|
||||
case EV_EMPTYCLIP:
|
||||
DEBUGNAME( "EV_EMPTYCLIP" );
|
||||
if ( ( es->weapon != WP_GRENADE_LAUNCHER ) && ( es->weapon != WP_GRENADE_PINEAPPLE ) && ( es->weapon != WP_DYNAMITE ) ) {
|
||||
trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.noAmmoSound );
|
||||
}
|
||||
break;
|
||||
|
||||
case EV_FILL_CLIP:
|
||||
|
@ -2022,8 +2035,10 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
CG_FireWeapon( cent );
|
||||
if ( event == EV_FIRE_WEAPONB ) { // akimbo firing colt
|
||||
cent->akimboFire = qtrue;
|
||||
cgVR->akimboFire = qtrue;
|
||||
} else {
|
||||
cent->akimboFire = qfalse;
|
||||
cgVR->akimboFire = qfalse;
|
||||
}
|
||||
break;
|
||||
case EV_FIRE_WEAPON_LASTSHOT:
|
||||
|
|
|
@ -929,6 +929,12 @@ typedef struct {
|
|||
int weaponAnimation;
|
||||
int weaponAnimationTime;
|
||||
|
||||
int wheelSelectorType;
|
||||
int wheelSelectorSelection;
|
||||
int wheelSelectorTime;
|
||||
vec3_t wheelSelectorOrigin;
|
||||
vec3_t wheelSelectorOffset;
|
||||
|
||||
// blend blobs
|
||||
viewDamage_t viewDamage[MAX_VIEWDAMAGE];
|
||||
float damageTime; // last time any kind of damage was recieved
|
||||
|
@ -1089,6 +1095,40 @@ typedef struct {
|
|||
qhandle_t lagometerShader;
|
||||
qhandle_t backTileShader;
|
||||
qhandle_t noammoShader;
|
||||
qhandle_t noammoIcon;
|
||||
|
||||
qhandle_t binocularsIcon;
|
||||
qhandle_t binocularsIconSelect;
|
||||
qhandle_t grenadeIcon;
|
||||
qhandle_t grenadeIconSelect;
|
||||
qhandle_t pineappleIcon;
|
||||
qhandle_t pineappleIconSelect;
|
||||
qhandle_t dynamiteIcon;
|
||||
qhandle_t dynamiteIconSelect;
|
||||
qhandle_t wine1Icon;
|
||||
qhandle_t wine1IconSelect;
|
||||
qhandle_t wine2Icon;
|
||||
qhandle_t wine2IconSelect;
|
||||
qhandle_t wine3Icon;
|
||||
qhandle_t wine3IconSelect;
|
||||
qhandle_t staminaIcon;
|
||||
qhandle_t staminaIconSelect;
|
||||
qhandle_t pbookIcon;
|
||||
qhandle_t pbookIconSelect;
|
||||
qhandle_t vbookIcon;
|
||||
qhandle_t vbookIconSelect;
|
||||
qhandle_t zbookIcon;
|
||||
qhandle_t zbookIconSelect;
|
||||
qhandle_t exitIcon;
|
||||
qhandle_t exitIconSelect;
|
||||
qhandle_t saveIcon;
|
||||
qhandle_t saveIconSelect;
|
||||
qhandle_t loadIcon;
|
||||
qhandle_t loadIconSelect;
|
||||
qhandle_t arrowIcon;
|
||||
qhandle_t weaponIcons[WP_NUM_WEAPONS];
|
||||
qhandle_t weaponIconsSelect[WP_NUM_WEAPONS];
|
||||
qhandle_t itemSelectCursor;
|
||||
|
||||
qhandle_t reticleShader;
|
||||
// qhandle_t reticleShaderSimple;
|
||||
|
@ -1471,6 +1511,11 @@ typedef struct {
|
|||
qhandle_t selectCursor;
|
||||
qhandle_t sizeCursor;
|
||||
|
||||
// comfort vignette
|
||||
qhandle_t vignetteShader;
|
||||
// left hand
|
||||
qhandle_t handModel;
|
||||
|
||||
} cgMedia_t;
|
||||
|
||||
|
||||
|
@ -2059,9 +2104,11 @@ void CG_Bullet( vec3_t origin, int sourceEntityNum, vec3_t normal, qboolean fles
|
|||
void CG_RailTrail( clientInfo_t *ci, vec3_t start, vec3_t end, int type ); //----(SA) added 'type'
|
||||
void CG_GrappleTrail( centity_t *ent, const weaponInfo_t *wi );
|
||||
void CG_AddViewWeapon( playerState_t *ps );
|
||||
void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent );
|
||||
void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent, qboolean akimbo );
|
||||
void CG_DrawWeaponSelect( void );
|
||||
void CG_DrawHoldableSelect( void );
|
||||
void CG_AddViewHand( playerState_t *ps );
|
||||
void CG_DrawWheelSelector( void );
|
||||
|
||||
void CG_OutOfAmmoChange( void );
|
||||
void CG_HoldableUsedupChange( void ); //----(SA) added
|
||||
|
|
|
@ -1283,6 +1283,76 @@ static void CG_RegisterGraphics( void ) {
|
|||
cgs.media.backTileShader = trap_R_RegisterShader( "gfx/2d/backtile" );
|
||||
cgs.media.noammoShader = trap_R_RegisterShader( "icons/noammo" );
|
||||
|
||||
cgs.media.arrowIcon = trap_R_RegisterShader( "icons/arrow" );
|
||||
cgs.media.binocularsIcon = trap_R_RegisterShader( "icons/binoculars" );
|
||||
cgs.media.grenadeIcon = trap_R_RegisterShader( "icons/iconw_grenade_1" );
|
||||
cgs.media.pineappleIcon = trap_R_RegisterShader( "icons/iconw_pineapple_1" );
|
||||
cgs.media.dynamiteIcon = trap_R_RegisterShader( "icons/iconw_dynamite_1" );
|
||||
cgs.media.wine1Icon = trap_R_RegisterShader( "icons/wine_notselect" );
|
||||
cgs.media.wine2Icon = trap_R_RegisterShader( "icons/wine2_notselect" );
|
||||
cgs.media.wine3Icon = trap_R_RegisterShader( "icons/wine3_notselect" );
|
||||
cgs.media.staminaIcon = trap_R_RegisterShader( "icons/stamina_notselect" );
|
||||
cgs.media.pbookIcon = trap_R_RegisterShader( "icons/icon_pbook_notselect" );
|
||||
cgs.media.vbookIcon = trap_R_RegisterShader( "icons/icon_vbook_notselect" );
|
||||
cgs.media.zbookIcon = trap_R_RegisterShader( "icons/icon_zbook_notselect" );
|
||||
cgs.media.exitIcon = trap_R_RegisterShader( "icons/exit" );
|
||||
cgs.media.loadIcon = trap_R_RegisterShader( "icons/load" );
|
||||
cgs.media.saveIcon = trap_R_RegisterShader( "icons/save" );
|
||||
cgs.media.binocularsIconSelect = trap_R_RegisterShader( "icons/binoculars_select" );
|
||||
cgs.media.grenadeIconSelect = trap_R_RegisterShader( "icons/iconw_grenade_1_select" );
|
||||
cgs.media.pineappleIconSelect = trap_R_RegisterShader( "icons/iconw_pineapple_1_select" );
|
||||
cgs.media.dynamiteIconSelect = trap_R_RegisterShader( "icons/iconw_dynamite_1_select" );
|
||||
cgs.media.wine1IconSelect = trap_R_RegisterShader( "icons/wine" );
|
||||
cgs.media.wine2IconSelect = trap_R_RegisterShader( "icons/wine2" );
|
||||
cgs.media.wine3IconSelect = trap_R_RegisterShader( "icons/wine3" );
|
||||
cgs.media.staminaIconSelect = trap_R_RegisterShader( "icons/stamina" );
|
||||
cgs.media.pbookIconSelect = trap_R_RegisterShader( "icons/icon_pbook" );
|
||||
cgs.media.vbookIconSelect = trap_R_RegisterShader( "icons/icon_vbook" );
|
||||
cgs.media.zbookIconSelect = trap_R_RegisterShader( "icons/icon_zbook" );
|
||||
cgs.media.exitIconSelect = trap_R_RegisterShader( "icons/exit_select" );
|
||||
cgs.media.loadIconSelect = trap_R_RegisterShader( "icons/load_select" );
|
||||
cgs.media.saveIconSelect = trap_R_RegisterShader( "icons/save_select" );
|
||||
|
||||
// Z-order of icon rendering is based on order they were registered, not based on depth
|
||||
// they are rendered at. So we are registering weapon icons again so they are properly
|
||||
// rendered on weapon wheel including no-ammo overlay icon
|
||||
cgs.media.weaponIcons[WP_KNIFE] = trap_R_RegisterShader( "icons/iconw_knife_1.tga" );
|
||||
cgs.media.weaponIcons[WP_LUGER] = trap_R_RegisterShader( "icons/iconw_luger_1.tga" );
|
||||
cgs.media.weaponIcons[WP_SILENCER] = trap_R_RegisterShader( "icons/iconw_sluger_1.tga" );
|
||||
cgs.media.weaponIcons[WP_COLT] = trap_R_RegisterShader( "icons/iconw_colt_1.tga" );
|
||||
cgs.media.weaponIcons[WP_AKIMBO] = trap_R_RegisterShader( "icons/iconw_acolt_1.tga" );
|
||||
cgs.media.weaponIcons[WP_MP40] = trap_R_RegisterShader( "icons/iconw_mp40_1.tga" );
|
||||
cgs.media.weaponIcons[WP_AKIMBO_MP40] = trap_R_RegisterShader( "icons/iconw_amp40_1.tga" );
|
||||
cgs.media.weaponIcons[WP_THOMPSON] = trap_R_RegisterShader( "icons/iconw_thompson_1.tga" );
|
||||
cgs.media.weaponIcons[WP_AKIMBO_THOMPSON] = trap_R_RegisterShader( "icons/iconw_athompson_1.tga" );
|
||||
cgs.media.weaponIcons[WP_STEN] = trap_R_RegisterShader( "icons/iconw_sten_1.tga" );
|
||||
cgs.media.weaponIcons[WP_MAUSER] = trap_R_RegisterShader( "icons/iconw_mauser_1.tga" );
|
||||
cgs.media.weaponIcons[WP_GARAND] = trap_R_RegisterShader( "icons/iconw_garand_1.tga" );
|
||||
cgs.media.weaponIcons[WP_FG42] = trap_R_RegisterShader( "icons/iconw_fg42_1.tga" );
|
||||
cgs.media.weaponIcons[WP_PANZERFAUST] = trap_R_RegisterShader( "icons/iconw_panzerfaust_1.tga" );
|
||||
cgs.media.weaponIcons[WP_VENOM] = trap_R_RegisterShader( "icons/iconw_venom_1.tga" );
|
||||
cgs.media.weaponIcons[WP_FLAMETHROWER] = trap_R_RegisterShader( "icons/iconw_flamethrower_1.tga" );
|
||||
cgs.media.weaponIcons[WP_TESLA] = trap_R_RegisterShader( "icons/iconw_tesla_1.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_KNIFE] = trap_R_RegisterShader( "icons/iconw_knife_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_LUGER] = trap_R_RegisterShader( "icons/iconw_luger_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_SILENCER] = trap_R_RegisterShader( "icons/iconw_sluger_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_COLT] = trap_R_RegisterShader( "icons/iconw_colt_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_AKIMBO] = trap_R_RegisterShader( "icons/iconw_acolt_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_MP40] = trap_R_RegisterShader( "icons/iconw_mp40_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_AKIMBO_MP40] = trap_R_RegisterShader( "icons/iconw_amp40_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_THOMPSON] = trap_R_RegisterShader( "icons/iconw_thompson_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_AKIMBO_THOMPSON] = trap_R_RegisterShader( "icons/iconw_athompson_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_STEN] = trap_R_RegisterShader( "icons/iconw_sten_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_MAUSER] = trap_R_RegisterShader( "icons/iconw_mauser_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_GARAND] = trap_R_RegisterShader( "icons/iconw_garand_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_FG42] = trap_R_RegisterShader( "icons/iconw_fg42_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_PANZERFAUST] = trap_R_RegisterShader( "icons/iconw_panzerfaust_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_VENOM] = trap_R_RegisterShader( "icons/iconw_venom_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_FLAMETHROWER] = trap_R_RegisterShader( "icons/iconw_flamethrower_1_select.tga" );
|
||||
cgs.media.weaponIconsSelect[WP_TESLA] = trap_R_RegisterShader( "icons/iconw_tesla_1_select.tga" );
|
||||
cgs.media.noammoIcon = trap_R_RegisterShader( "icons/noammo2" );
|
||||
cgs.media.itemSelectCursor = trap_R_RegisterShader( "icons/item_select_cursor.tga" );
|
||||
|
||||
// powerup shaders
|
||||
// cgs.media.quadShader = trap_R_RegisterShader("powerups/quad" );
|
||||
// cgs.media.quadWeaponShader = trap_R_RegisterShader("powerups/quadWeapon" );
|
||||
|
@ -1566,6 +1636,10 @@ static void CG_RegisterGraphics( void ) {
|
|||
// cgs.media.cursor = trap_R_RegisterShaderNoMip( "menu/art/3_cursor2" );
|
||||
cgs.media.sizeCursor = trap_R_RegisterShaderNoMip( "ui/assets/sizecursor.tga" );
|
||||
cgs.media.selectCursor = trap_R_RegisterShaderNoMip( "ui/assets/selectcursor.tga" );
|
||||
|
||||
cgs.media.vignetteShader = trap_R_RegisterShaderNoMip( "gfx/vignette" );
|
||||
cgs.media.handModel = trap_R_RegisterModel("models/players/bj/hand.md3");
|
||||
|
||||
CG_LoadingString( " - game media done" );
|
||||
|
||||
}
|
||||
|
|
|
@ -255,6 +255,9 @@ static int weapIconDrawSize( int weap ) {
|
|||
case WP_FG42SCOPE:
|
||||
case WP_SNOOPERSCOPE:
|
||||
case WP_SNIPERRIFLE:
|
||||
case WP_SILENCER:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -602,6 +605,8 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, int font, float scale, vec4
|
|||
return;
|
||||
|
||||
case WP_AKIMBO:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
special = qtrue;
|
||||
break;
|
||||
|
||||
|
@ -622,6 +627,10 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, int font, float scale, vec4
|
|||
|
||||
if ( type == 0 ) { // ammo
|
||||
value = cg.snap->ps.ammo[BG_FindAmmoForWeapon( weap )];
|
||||
if ( (weap == WP_COLT || weap == WP_MP40 || weap == WP_THOMPSON) && weapAlts[weap] ) {
|
||||
// When holding single weapon, add akimbo clip to reserve
|
||||
value += ps->ammoclip[weapAlts[weap]];
|
||||
}
|
||||
} else { // clip
|
||||
value = ps->ammoclip[BG_FindClipForWeapon( weap )];
|
||||
if ( special ) {
|
||||
|
@ -629,7 +638,6 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, int font, float scale, vec4
|
|||
if ( weapAlts[weap] ) {
|
||||
value = ps->ammoclip[weapAlts[weap]];
|
||||
}
|
||||
// value2 = ps->ammoclip[weapAlts[weap]];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -645,7 +653,11 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, int font, float scale, vec4
|
|||
|
||||
// if(special) { // draw '0' for akimbo guns
|
||||
if ( value2 || ( special && type == 1 ) ) {
|
||||
Com_sprintf( num, sizeof( num ), "%i /", value2 );
|
||||
if (weap == WP_AKIMBO_MP40 || weap == WP_AKIMBO_THOMPSON) {
|
||||
Com_sprintf( num, sizeof( num ), "%i/ ", value2 );
|
||||
} else {
|
||||
Com_sprintf( num, sizeof( num ), "%i /", value2 );
|
||||
}
|
||||
value = CG_Text_Width( num, font, scale, 0 );
|
||||
CG_Text_Paint( -30 + rect->x + ( rect->w - value ) / 2, rect->y + rect->h, font, scale, color, num, 0, 0, textStyle );
|
||||
}
|
||||
|
@ -1436,7 +1448,12 @@ float CG_GetValue( int ownerDraw, int type ) {
|
|||
case CG_PLAYER_AMMOCLIP_VALUE:
|
||||
if ( cent->currentState.weapon ) {
|
||||
if ( type == RANGETYPE_RELATIVE ) {
|
||||
return (float)ps->ammoclip[BG_FindClipForWeapon( cent->currentState.weapon )] / (float)ammoTable[cent->currentState.weapon].maxclip;
|
||||
int weapon = cent->currentState.weapon;
|
||||
if (weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON) {
|
||||
return (float)(ps->ammoclip[BG_FindClipForWeapon(weapon)] + ps->ammoclip[BG_FindClipForWeapon(weapAlts[weapon])]) / (float)(ammoTable[weapon].maxclip * 4);
|
||||
} else {
|
||||
return (float)ps->ammoclip[BG_FindClipForWeapon( cent->currentState.weapon )] / (float)ammoTable[cent->currentState.weapon].maxclip;
|
||||
}
|
||||
} else {
|
||||
return ps->ammoclip[BG_FindClipForWeapon( cent->currentState.weapon )];
|
||||
}
|
||||
|
|
|
@ -5021,7 +5021,7 @@ void CG_Player( centity_t *cent ) {
|
|||
//
|
||||
// add the gun / barrel / flash
|
||||
//
|
||||
CG_AddPlayerWeapon( &torso, NULL, cent );
|
||||
CG_AddPlayerWeapon( &torso, NULL, cent, qfalse );
|
||||
|
||||
cent->lastWeaponClientFrame = cg.clientFrame;
|
||||
|
||||
|
|
|
@ -74,7 +74,9 @@ void CG_CheckAmmo( void ) {
|
|||
case WP_FG42:
|
||||
case WP_FG42SCOPE:
|
||||
case WP_MP40:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_THOMPSON:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
case WP_STEN:
|
||||
case WP_VENOM:
|
||||
case WP_TESLA:
|
||||
|
|
|
@ -377,10 +377,10 @@ static void CG_TouchItem( centity_t *cent ) {
|
|||
//----(SA) added
|
||||
weapon = item->giTag;
|
||||
|
||||
if ( weapon == WP_COLT ) {
|
||||
if ( COM_BitCheck( cg.predictedPlayerState.weapons, WP_COLT ) ) {
|
||||
// you got the colt, you gettin' another
|
||||
weapon = WP_AKIMBO;
|
||||
if ( weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON ) {
|
||||
if ( COM_BitCheck( cg.predictedPlayerState.weapons, weapon ) ) {
|
||||
// you got one, you gettin' another
|
||||
weapon = weapAlts[weapon];
|
||||
}
|
||||
}
|
||||
//----(SA) end
|
||||
|
|
|
@ -640,16 +640,20 @@ static void CG_OffsetFirstPersonView( void ) {
|
|||
//===================================
|
||||
|
||||
// add view height
|
||||
origin[2] += cg.predictedPlayerState.viewheight;
|
||||
if (cgVR->vrIrlCrouchEnabled) {
|
||||
origin[2] += cgVR->viewHeight;
|
||||
} else {
|
||||
origin[2] += cg.predictedPlayerState.viewheight;
|
||||
|
||||
// smooth out duck height changes
|
||||
timeDelta = cg.time - cg.duckTime;
|
||||
if ( timeDelta < 0 ) { // Ridah
|
||||
cg.duckTime = cg.time - DUCK_TIME;
|
||||
}
|
||||
if ( timeDelta < DUCK_TIME ) {
|
||||
cg.refdef.vieworg[2] -= cg.duckChange
|
||||
* ( DUCK_TIME - timeDelta ) / DUCK_TIME;
|
||||
// smooth out duck height changes
|
||||
timeDelta = cg.time - cg.duckTime;
|
||||
if ( timeDelta < 0 ) { // Ridah
|
||||
cg.duckTime = cg.time - DUCK_TIME;
|
||||
}
|
||||
if ( timeDelta < DUCK_TIME ) {
|
||||
cg.refdef.vieworg[2] -= cg.duckChange
|
||||
* ( DUCK_TIME - timeDelta ) / DUCK_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
// add bob height
|
||||
|
@ -1603,9 +1607,16 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo
|
|||
DEBUGTIME
|
||||
}
|
||||
|
||||
|
||||
CG_AddViewWeapon( &cg.predictedPlayerState );
|
||||
|
||||
if (cgVR->wheelSelectorEnabled) {
|
||||
CG_DrawWheelSelector();
|
||||
} else if (!cgVR->screen){
|
||||
CG_AddViewWeapon( &cg.predictedPlayerState );
|
||||
int weapon = cg.predictedPlayerState.weapon;
|
||||
qboolean usingAkimbo = weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON;
|
||||
if (!usingAkimbo && !cgVR->weapon_stabilised && !cg.renderingThirdPerson) {
|
||||
CG_AddViewHand( &cg.predictedPlayerState);
|
||||
}
|
||||
}
|
||||
|
||||
DEBUGTIME
|
||||
|
||||
|
|
|
@ -160,6 +160,14 @@ typedef struct {
|
|||
|
||||
} refEntity_t;
|
||||
|
||||
typedef struct {
|
||||
int itemId;
|
||||
refEntity_t icon;
|
||||
refEntity_t iconSelected;
|
||||
qboolean notSelectable;
|
||||
refEntity_t labelNotSelectable;
|
||||
} selectorWheelEntity_t;
|
||||
|
||||
//----(SA)
|
||||
|
||||
// //
|
||||
|
|
|
@ -29,6 +29,9 @@ If you have questions concerning this license or the applicable additional terms
|
|||
// cl.input.c -- builds an intended movement command to send to the server
|
||||
|
||||
#include "client.h"
|
||||
#include "../../../RTCWVR/VrClientInfo.h"
|
||||
|
||||
extern vr_client_info_t vr;
|
||||
|
||||
unsigned frame_msec;
|
||||
int old_com_frameTime;
|
||||
|
@ -334,10 +337,10 @@ void IN_LeanLeftDown( void ) { IN_KeyDown( &kb[KB_WBUTTONS4] ); } //----(S
|
|||
void IN_LeanLeftUp( void ) { IN_KeyUp( &kb[KB_WBUTTONS4] ); }
|
||||
void IN_LeanRightDown( void ) { IN_KeyDown( &kb[KB_WBUTTONS5] ); } //----(SA) lean right
|
||||
void IN_LeanRightUp( void ) { IN_KeyUp( &kb[KB_WBUTTONS5] ); }
|
||||
void IN_Activate2Down( void ) {IN_KeyDown( &kb[KB_WBUTTONS6] );}
|
||||
void IN_Activate2Up( void ) {IN_KeyUp( &kb[KB_WBUTTONS6] );}
|
||||
|
||||
// unused
|
||||
void IN_Wbutton6Down( void ) { IN_KeyDown( &kb[KB_WBUTTONS6] ); }
|
||||
void IN_Wbutton6Up( void ) { IN_KeyUp( &kb[KB_WBUTTONS6] ); }
|
||||
void IN_Wbutton7Down( void ) { IN_KeyDown( &kb[KB_WBUTTONS7] ); }
|
||||
void IN_Wbutton7Up( void ) { IN_KeyUp( &kb[KB_WBUTTONS7] ); }
|
||||
|
||||
|
@ -445,6 +448,8 @@ void CL_AdjustAngles( void ) {
|
|||
cl.viewangles[PITCH] = new_move.pitch;
|
||||
|
||||
cl.viewangles[ROLL] = new_move.roll;
|
||||
|
||||
VectorCopy(cl.viewangles, vr.clientviewangles);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -486,7 +491,7 @@ void CL_KeyMove( usercmd_t *cmd ) {
|
|||
side -= movespeed * CL_KeyState( &kb[KB_MOVELEFT] );
|
||||
|
||||
//----(SA) added
|
||||
if ( cmd->buttons & BUTTON_ACTIVATE ) {
|
||||
if ( (cmd->buttons & BUTTON_ACTIVATE) || (cmd->wbuttons & WBUTTON_ACTIVATE2) ) {
|
||||
if ( side > 0 ) {
|
||||
cmd->wbuttons |= WBUTTON_LEANRIGHT;
|
||||
} else if ( side < 0 ) {
|
||||
|
@ -1222,8 +1227,8 @@ void CL_InitInput( void ) {
|
|||
Cmd_AddCommand( "-leanleft", IN_LeanLeftUp );
|
||||
Cmd_AddCommand( "+leanright", IN_LeanRightDown );
|
||||
Cmd_AddCommand( "-leanright", IN_LeanRightUp );
|
||||
Cmd_AddCommand( "+wbutton6", IN_Wbutton6Down ); //
|
||||
Cmd_AddCommand( "-wbutton6", IN_Wbutton6Up );
|
||||
Cmd_AddCommand( "+activate2", IN_Activate2Down );
|
||||
Cmd_AddCommand( "-activate2", IN_Activate2Up );
|
||||
Cmd_AddCommand( "+wbutton7", IN_Wbutton7Down ); //
|
||||
Cmd_AddCommand( "-wbutton7", IN_Wbutton7Up );
|
||||
//----(SA) end
|
||||
|
|
|
@ -1070,7 +1070,7 @@ typedef enum
|
|||
#define MAX_WEAPS_IN_BANK_MP 8
|
||||
#define MAX_WEAP_BANKS_MP 7
|
||||
// jpw
|
||||
#define MAX_WEAP_ALTS WP_DYNAMITE
|
||||
#define MAX_WEAP_ALTS WP_AKIMBO_THOMPSON
|
||||
|
||||
|
||||
// bit field limits
|
||||
|
@ -1295,9 +1295,9 @@ typedef struct playerState_s {
|
|||
#define WBUTTON_RELOAD 8
|
||||
#define WBUTTON_LEANLEFT 16
|
||||
#define WBUTTON_LEANRIGHT 32
|
||||
#define WBUTTON_ACTIVATE2 64
|
||||
|
||||
// unused
|
||||
#define WBUTTON_EXTRA6 64
|
||||
#define WBUTTON_EXTRA7 128
|
||||
//----(SA) end
|
||||
|
||||
|
|
|
@ -1866,6 +1866,8 @@ float AICast_GetWeaponSoundRange( int weapon ) {
|
|||
|
||||
case WP_MP40:
|
||||
case WP_THOMPSON:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
return 1000;
|
||||
|
||||
case WP_FG42:
|
||||
|
|
|
@ -2896,7 +2896,7 @@ char *AIFunc_BattleChase( cast_state_t *cs ) {
|
|||
//
|
||||
// if they are visible, but not attackable, look for a spot where we can attack them, and head
|
||||
// for there. This should prevent AI's getting stuck in a bunch.
|
||||
if ( !moved && cs->weaponNum >= WP_LUGER && cs->weaponNum <= WP_AKIMBO && cs->attributes[TACTICAL] >= 0.1 ) {
|
||||
if ( !moved && ((cs->weaponNum >= WP_LUGER && cs->weaponNum <= WP_AKIMBO) || cs->weaponNum == WP_AKIMBO_MP40 || cs->weaponNum == WP_AKIMBO_THOMPSON ) && cs->attributes[TACTICAL] >= 0.1 ) {
|
||||
//
|
||||
// check for another movement we should be making
|
||||
if ( cs->obstructingTime > level.time ) {
|
||||
|
|
|
@ -1321,10 +1321,10 @@ qboolean AICast_ScriptAction_GiveWeapon( cast_state_t *cs, char *params ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( weapon == WP_COLT ) {
|
||||
// if you had the colt already, now you've got two!
|
||||
if ( COM_BitCheck( g_entities[cs->entityNum].client->ps.weapons, WP_COLT ) ) {
|
||||
weapon = WP_AKIMBO;
|
||||
if ( weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON ) {
|
||||
// if you had one already, now you've got two!
|
||||
if ( COM_BitCheck( g_entities[cs->entityNum].client->ps.weapons, weapon ) ) {
|
||||
weapon = weapAlts[weapon];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1407,13 +1407,13 @@ qboolean AICast_ScriptAction_TakeWeapon( cast_state_t *cs, char *params ) {
|
|||
if ( weapon != WP_NONE ) {
|
||||
qboolean clear;
|
||||
|
||||
if ( weapon == WP_AKIMBO ) {
|
||||
// take both the colt /and/ the akimbo weapons when 'akimbo' is specified
|
||||
COM_BitClear( g_entities[cs->entityNum].client->ps.weapons, WP_COLT );
|
||||
} else if ( weapon == WP_COLT ) {
|
||||
// take 'akimbo' first if it's there, then take 'colt'
|
||||
if ( COM_BitCheck( g_entities[cs->entityNum].client->ps.weapons, WP_AKIMBO ) ) {
|
||||
weapon = WP_AKIMBO;
|
||||
if ( weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON ) {
|
||||
// take both the main gun /and/ the akimbo weapons when 'akimbo' is specified
|
||||
COM_BitClear( g_entities[cs->entityNum].client->ps.weapons, weapAlts[weapon] );
|
||||
} else if ( weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON ) {
|
||||
// take 'akimbo' first if it's there, then take single gun
|
||||
if ( COM_BitCheck( g_entities[cs->entityNum].client->ps.weapons, weapAlts[weapon] ) ) {
|
||||
weapon = weapAlts[weapon];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,8 @@ extern vmCvar_t g_gametype;
|
|||
#define MAX_AMMO_FG42 MAX_AMMO_MAUSER
|
||||
#define MAX_AMMO_BAR 200
|
||||
|
||||
#define TRIGGER_SECONDARY 1
|
||||
#define TRIGGER_PRIMARY 2
|
||||
|
||||
// these defines are matched with the character torso animations
|
||||
#define DELAY_LOW 100 // machineguns, tesla, spear, flame
|
||||
|
@ -128,13 +130,15 @@ ammotable_t ammoTable[] = {
|
|||
// { 100, 1, 100, 1000, DELAY_PISTOL, 900, 0, 0, MOD_CROSS }, // WP_CROSS // 29
|
||||
{ 10, 1, 10, 1000, DELAY_THROW_VR, 1600, 0, 0, MOD_DYNAMITE }, // WP_DYNAMITE // 30
|
||||
// { 10, 1, 10, 1000, DELAY_THROW, 1600, 0, 0, MOD_DYNAMITE }, // WP_DYNAMITE2 // 31
|
||||
{ MAX_AMMO_9MM, 1, 32, 2600, DELAY_LOW, 70, 0, 0, MOD_AKIMBO_MP40 }, // WP_AKIMBO_MP40 // 32
|
||||
{ MAX_AMMO_45, 1, 30, 2400, DELAY_LOW, 90, 0, 0, MOD_AKIMBO_THOMPSON }, // WP_AKIMBO_THOMPSON // 33
|
||||
|
||||
// stubs for some "not-real" weapons (so they always return "yes, you have enough ammo for that gauntlet", etc.)
|
||||
// { 5, 1, 5, 1000, DELAY_SHOULDER, 1200, 0, 0, 0 /*mod_prox*/ }, // WP_PROX // 32
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 }, // WP_MONSTER_ATTACK1 // 33
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 }, // WP_MONSTER_ATTACK2 // 34
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 }, // WP_MONSTER_ATTACK3 // 35
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 } // WP_GAUNTLET // 36
|
||||
// { 5, 1, 5, 1000, DELAY_SHOULDER, 1200, 0, 0, 0 /*mod_prox*/ }, // WP_PROX // 34
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 }, // WP_MONSTER_ATTACK1 // 35
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 }, // WP_MONSTER_ATTACK2 // 36
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 }, // WP_MONSTER_ATTACK3 // 37
|
||||
{ 999, 0, 999, 0, 50, 0, 0, 0, 0 } // WP_GAUNTLET // 38
|
||||
};
|
||||
|
||||
|
||||
|
@ -143,7 +147,7 @@ int weapAlts[] = {
|
|||
WP_NONE, // 0 WP_NONE
|
||||
WP_NONE, // 1 WP_KNIFE
|
||||
WP_SILENCER, // 2 WP_LUGER
|
||||
WP_NONE, // 3 WP_MP40
|
||||
WP_AKIMBO_MP40, // 3 WP_MP40
|
||||
WP_SNIPERRIFLE, // 4 WP_MAUSER
|
||||
WP_FG42SCOPE, // 5 WP_FG42 // was SP5
|
||||
WP_NONE, // 6 WP_GRENADE_LAUNCHER
|
||||
|
@ -154,7 +158,7 @@ int weapAlts[] = {
|
|||
// WP_SPEARGUN_CO2, // 11 WP_SPEARGUN
|
||||
// WP_NONE, // 12 WP_KNIFE2
|
||||
WP_AKIMBO, // 13 WP_COLT //----(SA) new
|
||||
WP_NONE, // 14 WP_THOMPSON
|
||||
WP_AKIMBO_THOMPSON, // 14 WP_THOMPSON
|
||||
WP_SNOOPERSCOPE, // 15 WP_GARAND
|
||||
// WP_BAR2, // 16 WP_BAR //----(SA) modified
|
||||
WP_NONE, // 17 WP_GRENADE_PINEAPPLE
|
||||
|
@ -170,8 +174,10 @@ int weapAlts[] = {
|
|||
WP_COLT, // 27 WP_AKIMBO //----(SA) new
|
||||
WP_NONE, // 28 WP_CLASS_SPECIAL
|
||||
// WP_NONE, // 29 WP_CROSS
|
||||
WP_NONE // 30 WP_DYNAMITE //----(SA) modified (not in rotation yet)
|
||||
WP_NONE, // 30 WP_DYNAMITE //----(SA) modified (not in rotation yet)
|
||||
// WP_DYNAMITE // 31 WP_DYNAMITE2 //----(SA) new
|
||||
WP_MP40, // 32 WP_AKIMBO_MP40
|
||||
WP_THOMPSON // 33 WP_AKIMBO_THOMPSON
|
||||
};
|
||||
|
||||
|
||||
|
@ -1018,6 +1024,30 @@ model="models/weapons2/mauser/mauser.md3"
|
|||
{0,0,0,0}
|
||||
},
|
||||
|
||||
/*weapon_akimbo
|
||||
dual thompson
|
||||
*/
|
||||
{
|
||||
"weapon_akimbo_thompson",
|
||||
"sound/misc/w_pkup.wav",
|
||||
{ "models/weapons2/thompson/thompson.md3",
|
||||
"models/weapons2/thompson/v_thompson.md3",
|
||||
"models/weapons2/thompson/pu_thompson.md3",
|
||||
0, 0 },
|
||||
|
||||
"icons/iconw_athompson_1", // icon
|
||||
"icons/ammo2", // ammo icon
|
||||
"Dual Thompsons", // pickup
|
||||
30,
|
||||
IT_WEAPON,
|
||||
WP_AKIMBO_THOMPSON,
|
||||
WP_COLT,
|
||||
WP_AKIMBO_THOMPSON,
|
||||
"", // precache
|
||||
"", // sounds
|
||||
{0,0,0,0}
|
||||
},
|
||||
|
||||
/*QUAKED weapon_thompson (.3 .3 1) (-16 -16 -16) (16 16 16) SUSPENDED SPIN - RESPAWN
|
||||
-------- MODEL FOR RADIANT ONLY - DO NOT SET THIS AS A KEY --------
|
||||
model="models/weapons2/thompson/thompson.md3"
|
||||
|
@ -1073,12 +1103,12 @@ dual colts
|
|||
{
|
||||
"weapon_akimbo",
|
||||
"sound/misc/w_pkup.wav",
|
||||
{ "models/weapons2/colt2/colt2.md3",
|
||||
"models/weapons2/colt2/v_colt2.md3",
|
||||
"models/weapons2/colt2/pu_colt2.md3",
|
||||
{ "models/weapons2/colt/colt.md3",
|
||||
"models/weapons2/colt/v_colt.md3",
|
||||
"models/weapons2/colt/pu_colt.md3",
|
||||
0, 0 },
|
||||
|
||||
"icons/iconw_colt_1", // icon
|
||||
"icons/iconw_acolt_1", // icon
|
||||
"icons/ammo2", // ammo icon
|
||||
"Dual Colts", // pickup
|
||||
50,
|
||||
|
@ -1145,6 +1175,30 @@ model="models/weapons2/garand/garand.md3"
|
|||
{0,0,0,0}
|
||||
},
|
||||
|
||||
/*weapon_akimbo
|
||||
dual MP40
|
||||
*/
|
||||
{
|
||||
"weapon_akimbo_mp40",
|
||||
"sound/misc/w_pkup.wav",
|
||||
{ "models/weapons2/mp40/mp40.md3",
|
||||
"models/weapons2/mp40/v_mp40.md3",
|
||||
"models/weapons2/mp40/pu_mp40.md3",
|
||||
0, 0 },
|
||||
|
||||
"icons/iconw_amp40_1", // icon
|
||||
"icons/ammo2", // ammo icon
|
||||
"Dual MP40", // pickup
|
||||
30,
|
||||
IT_WEAPON,
|
||||
WP_AKIMBO_MP40,
|
||||
WP_LUGER,
|
||||
WP_AKIMBO_MP40,
|
||||
"", // precache
|
||||
"", // sounds
|
||||
{0,0,0,0}
|
||||
},
|
||||
|
||||
/*QUAKED weapon_mp40 (.3 .3 1) (-16 -16 -16) (16 16 16) SUSPENDED SPIN - RESPAWN
|
||||
"stand" values:
|
||||
no value: laying in a default position on it's side (default)
|
||||
|
@ -1270,7 +1324,7 @@ model="models/weapons2/sp5/sp5.md3"
|
|||
"models/weapons2/silencer/pu_silencer.md3",
|
||||
0, 0},
|
||||
|
||||
"icons/iconw_silencer_1", // icon
|
||||
"icons/iconw_sluger_1", // icon
|
||||
"icons/ammo5", // ammo icon
|
||||
// "Silencer", // pickup
|
||||
"sp5 pistol",
|
||||
|
@ -3621,30 +3675,33 @@ BG_AkimboFireSequence
|
|||
==============
|
||||
*/
|
||||
//qboolean BG_AkimboFireSequence( playerState_t *ps ) {
|
||||
qboolean BG_AkimboFireSequence( int weapon, int akimboClip, int coltClip ) {
|
||||
qboolean BG_AkimboFireSequence( int weapon, int akimboClip, int mainClip, int triggerState ) {
|
||||
// NOTE: this doesn't work when clips are turned off (dmflags 64)
|
||||
|
||||
if ( weapon != WP_AKIMBO ) {
|
||||
if ( weapon != WP_AKIMBO && weapon != WP_AKIMBO_MP40 && weapon != WP_AKIMBO_THOMPSON ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
// If only one trigger is pushed, return weapon matching the trigger
|
||||
if ((triggerState & TRIGGER_SECONDARY) && !(triggerState & TRIGGER_PRIMARY)) {
|
||||
return qtrue; // Firing secondary weapon
|
||||
}
|
||||
if ((triggerState & TRIGGER_PRIMARY) && !(triggerState & TRIGGER_SECONDARY)) {
|
||||
return qfalse; // Firing primary weapon
|
||||
}
|
||||
|
||||
// If both triggers are pushed and one weapon is missing ammo, return the other
|
||||
if ( !akimboClip ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
// no ammo in colt, must be akimbo turn
|
||||
if ( !coltClip ) {
|
||||
if ( !mainClip ) {
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
// at this point, both have ammo
|
||||
|
||||
// now check 'cycle' // (removed old method 11/5/2001)
|
||||
if ( ( akimboClip + coltClip ) & 1 ) {
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
return qtrue;
|
||||
// At this point, both have ammo and we are firing from both
|
||||
// Switch between primary and secondary after each fired shot
|
||||
return ( ( akimboClip + mainClip ) & 1 );
|
||||
}
|
||||
|
||||
//----(SA) end
|
||||
|
|
|
@ -50,6 +50,8 @@ extern vmCvar_t g_gametype;
|
|||
extern vr_client_info_t* gVR;
|
||||
#endif
|
||||
|
||||
#define TRIGGER_SECONDARY 1
|
||||
#define TRIGGER_PRIMARY 2
|
||||
|
||||
// JPW NERVE -- stuck this here so it can be seen client & server side
|
||||
float Com_GetFlamethrowerRange( void ) {
|
||||
|
@ -1620,9 +1622,20 @@ static void PM_CheckDuck( void ) {
|
|||
|
||||
pm->mins[2] = pm->ps->mins[2];
|
||||
|
||||
vr_client_info_t* vr;
|
||||
#ifdef CGAMEDLL
|
||||
vr = cgVR;
|
||||
#endif
|
||||
#ifdef GAMEDLL
|
||||
vr = gVR;
|
||||
#endif
|
||||
|
||||
if ( pm->ps->pm_type == PM_DEAD ) {
|
||||
pm->maxs[2] = pm->ps->maxs[2]; // NOTE: must set death bounding box in game code
|
||||
pm->ps->viewheight = pm->ps->deadViewHeight;
|
||||
if (vr && !pm->ps->clientNum && vr->vrIrlCrouchEnabled) {
|
||||
vr->viewHeight = pm->ps->deadViewHeight;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1630,6 +1643,60 @@ static void PM_CheckDuck( void ) {
|
|||
if ( pm->ps->eFlags & EF_MG42_ACTIVE ) {
|
||||
pm->maxs[2] = pm->ps->maxs[2];
|
||||
pm->ps->viewheight = pm->ps->standViewHeight;
|
||||
if (vr && !pm->ps->clientNum && vr->vrIrlCrouchEnabled) {
|
||||
vr->viewHeight = pm->ps->standViewHeight;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// IRL Crouch
|
||||
if (vr && !pm->ps->clientNum && vr->vrIrlCrouchEnabled) {
|
||||
int viewOffset = pm->ps->maxs[2] - pm->ps->standViewHeight; // 8
|
||||
int standHeight = pm->ps->maxs[2]; // 48
|
||||
int crouchHeight = pm->ps->crouchMaxZ; // 24
|
||||
// In case of IRL crouch we must use separate var for view height so
|
||||
// we can change ps.viewheight without affecting camera view (we do not
|
||||
// want to lower camera view as we are crouching IRL).
|
||||
// But ps.viewheight needs to be changed as it affects how AI sees the
|
||||
// player.
|
||||
vr->viewHeight = pm->ps->standViewHeight; // 40
|
||||
|
||||
// Compute in-game height based on HMD height above floor
|
||||
// (adjust height only when crouching, ignore IRL jumps)
|
||||
int computedHeight = standHeight;
|
||||
if (crouchHeight < standHeight && vr->curHeight < vr->maxHeight) {
|
||||
// Count minimum IRL crouch height based on maximum IRL height
|
||||
float minHeight = vr->maxHeight * vr->vrIrlCrouchToStandRatio;
|
||||
if (vr->curHeight < minHeight) { // Do not allow to crawl (set min height)
|
||||
computedHeight = crouchHeight;
|
||||
} else {
|
||||
float heightRatio = (vr->curHeight - minHeight) / (vr->maxHeight - minHeight);
|
||||
computedHeight = crouchHeight + (int)(heightRatio * (standHeight - crouchHeight));
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust height based on where are you standing
|
||||
// (cannot stand up if there is no place, find nearest possible height)
|
||||
for (int i = computedHeight; i > 0; i--) {
|
||||
pm->maxs[2] = i;
|
||||
pm->ps->viewheight = i - viewOffset;
|
||||
pm->trace( &trace, pm->ps->origin, pm->mins, pm->maxs, pm->ps->origin, pm->ps->clientNum, pm->tracemask );
|
||||
if ( !trace.allsolid ) {
|
||||
break;
|
||||
} else {
|
||||
// Lower camera view height to not see through ceiling
|
||||
// (in case you stand up IRL in tight place)
|
||||
vr->viewHeight--;
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle duck flag based on in-game height (need to be at least half-way crouched)
|
||||
if (pm->maxs[2] < crouchHeight + (standHeight - crouchHeight)/2) {
|
||||
pm->ps->pm_flags |= PMF_DUCKED;
|
||||
} else {
|
||||
pm->ps->pm_flags &= ~PMF_DUCKED;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2001,7 +2068,7 @@ static void PM_BeginWeaponReload( int weapon ) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ( weapon < WP_BEGINGERMAN || weapon > WP_DYNAMITE ) {
|
||||
if ( weapon < WP_BEGINGERMAN || weapon > WP_AKIMBO_THOMPSON ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2083,7 +2150,10 @@ static void PM_BeginWeaponChange( int oldweapon, int newweapon, qboolean reload
|
|||
return;
|
||||
}
|
||||
|
||||
altswitch = (qboolean)( newweapon == weapAlts[oldweapon] );
|
||||
altswitch = (qboolean)( newweapon == weapAlts[oldweapon]
|
||||
&& newweapon != WP_AKIMBO && newweapon != WP_COLT
|
||||
&& newweapon != WP_AKIMBO_MP40 && newweapon != WP_MP40
|
||||
&& newweapon != WP_AKIMBO_THOMPSON && newweapon != WP_THOMPSON );
|
||||
|
||||
showdrop = qtrue;
|
||||
|
||||
|
@ -2259,6 +2329,12 @@ PM_ReloadClip
|
|||
==============
|
||||
*/
|
||||
static void PM_ReloadClip( int weapon ) {
|
||||
if ( weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON ) {
|
||||
// When using akimbo, reload main weapon first to be able
|
||||
// to use it as single weapon in case ammo runs out.
|
||||
PM_ReloadClip( weapAlts[weapon] );
|
||||
}
|
||||
|
||||
int ammoreserve, ammoclip, ammomove;
|
||||
|
||||
ammoreserve = pm->ps->ammo[ BG_FindAmmoForWeapon( weapon )];
|
||||
|
@ -2275,8 +2351,20 @@ static void PM_ReloadClip( int weapon ) {
|
|||
pm->ps->ammoclip[BG_FindClipForWeapon( weapon )] += ammomove;
|
||||
}
|
||||
|
||||
if ( weapon == WP_AKIMBO ) { // reload colt too
|
||||
PM_ReloadClip( WP_COLT );
|
||||
// If clip is not full, check if we have ammo in akimbo clip
|
||||
// If so, fill main weapon clip from akimbo clip
|
||||
ammoclip = pm->ps->ammoclip[BG_FindClipForWeapon( weapon )];
|
||||
ammomove = ammoTable[weapon].maxclip - ammoclip;
|
||||
if (ammomove && (weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON)) {
|
||||
int altWeapon = weapAlts[weapon];
|
||||
if (altWeapon != pm->ps->weapon) {
|
||||
ammoreserve = pm->ps->ammoclip[ BG_FindClipForWeapon( altWeapon )];
|
||||
if ( ammoreserve < ammomove ) {
|
||||
ammomove = ammoreserve;
|
||||
}
|
||||
pm->ps->ammoclip[BG_FindClipForWeapon( altWeapon )] -= ammomove;
|
||||
pm->ps->ammoclip[BG_FindClipForWeapon( weapon )] += ammomove;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2362,25 +2450,32 @@ void PM_CheckForReload( int weapon ) {
|
|||
if ( pm->ps->ammoclip[clipWeap] < ammoTable[weapon].maxclip ) {
|
||||
doReload = qtrue;
|
||||
}
|
||||
if ( weapon == WP_AKIMBO ) {
|
||||
// akimbo should also check Colt status
|
||||
if ( pm->ps->ammoclip[BG_FindClipForWeapon( WP_COLT )] < ammoTable[BG_FindClipForWeapon( WP_COLT )].maxclip ) {
|
||||
if ( weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON ) {
|
||||
// akimbo should also check main status
|
||||
if ( pm->ps->ammoclip[BG_FindClipForWeapon( weapAlts[weapon] )] < ammoTable[BG_FindClipForWeapon( weapAlts[weapon] )].maxclip ) {
|
||||
doReload = qtrue;
|
||||
}
|
||||
}
|
||||
} else if (weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON) {
|
||||
// Allow to reload main weapon from akimbo clip
|
||||
if ( pm->ps->ammoclip[BG_FindClipForWeapon( weapAlts[weapon] )] ) {
|
||||
if ( pm->ps->ammoclip[clipWeap] < ammoTable[weapon].maxclip) {
|
||||
doReload = qtrue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// clip is empty, but you have reserves. (auto reload)
|
||||
else if ( !( pm->ps->ammoclip[clipWeap] ) ) { // clip is empty...
|
||||
if ( pm->ps->ammo[ammoWeap] ) { // and you have reserves
|
||||
if ( weapon == WP_AKIMBO ) { // if colt's got ammo, don't force reload yet (you know you've got it 'out' since you've got the akimbo selected
|
||||
if ( !( pm->ps->ammoclip[WP_COLT] ) ) {
|
||||
if ( weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON ) { // reload only if both clips are empty
|
||||
if ( !( pm->ps->ammoclip[weapAlts[weapon]] ) ) {
|
||||
doReload = qtrue;
|
||||
}
|
||||
// likewise. however, you need to check if you've got the akimbo selected, since you could have the colt alone
|
||||
} else if ( weapon == WP_COLT ) { // weapon checking for reload is colt...
|
||||
if ( pm->ps->weapon == WP_AKIMBO ) { // you've got the akimbo selected...
|
||||
if ( !( pm->ps->ammoclip[WP_AKIMBO] ) ) { // and it's got no ammo either
|
||||
// likewise. however, you need to check if you've got the akimbo selected, since you could have the main alone
|
||||
} else if ( weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON ) { // weapon checking for reload is colt...
|
||||
if ( pm->ps->weapon == weapAlts[weapon] ) { // reload only if both clips are empty
|
||||
if ( !( pm->ps->ammoclip[weapon] ) && !( pm->ps->ammoclip[weapAlts[weapon]] ) ) {
|
||||
doReload = qtrue; // so reload
|
||||
}
|
||||
} else { // single colt selected
|
||||
|
@ -2389,6 +2484,13 @@ void PM_CheckForReload( int weapon ) {
|
|||
} else {
|
||||
doReload = qtrue;
|
||||
}
|
||||
} else if (weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON) {
|
||||
// Allow to reload main weapon from akimbo clip
|
||||
if ( pm->ps->ammoclip[BG_FindClipForWeapon( weapAlts[weapon] )] ) {
|
||||
if ( pm->ps->ammoclip[clipWeap] < ammoTable[weapon].maxclip) {
|
||||
doReload = qtrue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2470,9 +2572,16 @@ void PM_WeaponUseAmmo( int wp, int amount ) {
|
|||
pm->ps->ammo[ BG_FindAmmoForWeapon( wp )] -= amount;
|
||||
} else {
|
||||
takeweapon = BG_FindClipForWeapon( wp );
|
||||
if ( wp == WP_AKIMBO ) {
|
||||
if ( !BG_AkimboFireSequence( wp, pm->ps->ammoclip[WP_AKIMBO], pm->ps->ammoclip[WP_COLT] ) ) {
|
||||
takeweapon = WP_COLT;
|
||||
if ( wp == WP_AKIMBO || wp == WP_AKIMBO_MP40 || wp == WP_AKIMBO_THOMPSON ) {
|
||||
int triggerState = 0;
|
||||
#ifdef CGAMEDLL
|
||||
triggerState = cgVR->akimboTriggerState;
|
||||
#endif
|
||||
#ifdef GAMEDLL
|
||||
triggerState = gVR->akimboTriggerState;
|
||||
#endif
|
||||
if ( !BG_AkimboFireSequence( wp, pm->ps->ammoclip[wp], pm->ps->ammoclip[weapAlts[wp]], triggerState ) ) {
|
||||
takeweapon = weapAlts[wp];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2495,9 +2604,16 @@ int PM_WeaponAmmoAvailable( int wp ) {
|
|||
} else {
|
||||
// return pm->ps->ammoclip[BG_FindClipForWeapon( wp )];
|
||||
takeweapon = BG_FindClipForWeapon( wp );
|
||||
if ( wp == WP_AKIMBO ) {
|
||||
if ( !BG_AkimboFireSequence( pm->ps->weapon, pm->ps->ammoclip[WP_AKIMBO], pm->ps->ammoclip[WP_COLT] ) ) {
|
||||
takeweapon = WP_COLT;
|
||||
if ( wp == WP_AKIMBO || wp == WP_AKIMBO_MP40 || wp == WP_AKIMBO_THOMPSON ) {
|
||||
int triggerState = 0;
|
||||
#ifdef CGAMEDLL
|
||||
triggerState = cgVR->akimboTriggerState;
|
||||
#endif
|
||||
#ifdef GAMEDLL
|
||||
triggerState = gVR->akimboTriggerState;
|
||||
#endif
|
||||
if ( !BG_AkimboFireSequence( pm->ps->weapon, pm->ps->ammoclip[wp], pm->ps->ammoclip[weapAlts[wp]], triggerState ) ) {
|
||||
takeweapon = weapAlts[wp];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2593,10 +2709,8 @@ void PM_AdjustAimSpreadScale( void ) {
|
|||
case WP_SILENCER:
|
||||
wpnScale = 0.5f;
|
||||
break;
|
||||
case WP_AKIMBO: //----(SA) added
|
||||
wpnScale = 0.5;
|
||||
break;
|
||||
case WP_COLT:
|
||||
case WP_AKIMBO:
|
||||
wpnScale = 0.4f; // doesn't fire as fast, but easier to handle than luger
|
||||
break;
|
||||
case WP_VENOM:
|
||||
|
@ -2615,6 +2729,7 @@ void PM_AdjustAimSpreadScale( void ) {
|
|||
wpnScale = 0.5f;
|
||||
break;
|
||||
case WP_MP40:
|
||||
case WP_AKIMBO_MP40:
|
||||
wpnScale = 0.5f; // 2 handed, but not as long as mauser, so harder to keep aim
|
||||
break;
|
||||
case WP_FG42:
|
||||
|
@ -2624,6 +2739,7 @@ void PM_AdjustAimSpreadScale( void ) {
|
|||
wpnScale = 0.7f;
|
||||
break;
|
||||
case WP_THOMPSON:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
wpnScale = 0.4f;
|
||||
break;
|
||||
case WP_STEN:
|
||||
|
@ -2786,7 +2902,22 @@ static void PM_Weapon( void ) {
|
|||
// RF, remoed this, was preventing lava from hurting player
|
||||
//pm->watertype = 0;
|
||||
|
||||
akimboFire = BG_AkimboFireSequence( pm->ps->weapon, pm->ps->ammoclip[WP_AKIMBO], pm->ps->ammoclip[WP_COLT] );
|
||||
int triggerState = 0;
|
||||
#ifdef CGAMEDLL
|
||||
if (cgVR) {
|
||||
triggerState = cgVR->akimboTriggerState;
|
||||
}
|
||||
#endif
|
||||
#ifdef GAMEDLL
|
||||
if (gVR) {
|
||||
triggerState = gVR->akimboTriggerState;
|
||||
}
|
||||
#endif
|
||||
if (pm->ps->weapon == WP_AKIMBO || pm->ps->weapon == WP_AKIMBO_MP40 || pm->ps->weapon == WP_AKIMBO_THOMPSON) {
|
||||
akimboFire = BG_AkimboFireSequence( pm->ps->weapon, pm->ps->ammoclip[pm->ps->weapon], pm->ps->ammoclip[weapAlts[pm->ps->weapon]], triggerState );
|
||||
} else {
|
||||
akimboFire = qfalse;
|
||||
}
|
||||
|
||||
if ( 0 ) {
|
||||
switch ( pm->ps->weaponstate ) {
|
||||
|
@ -3061,7 +3192,6 @@ if ( pm->ps->weapon == WP_NONE ) { // this is possible since the player starts
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// JPW NERVE -- in multiplayer, don't allow panzerfaust or dynamite to fire if charge bar isn't full
|
||||
#ifdef GAMEDLL
|
||||
if ( g_gametype.integer == GT_WOLF ) {
|
||||
|
@ -3107,6 +3237,21 @@ if ( !( pm->cmd.buttons & ( BUTTON_ATTACK | WBUTTON_ATTACK2 ) ) && !delayedFire
|
|||
return;
|
||||
}
|
||||
|
||||
// In case of akimbo, fire only if player still holds at least one of triggers
|
||||
// (Sometimes with really quick tap +attack is spawned but trigger state is no longer
|
||||
// set when reaching here. Exiting solves problem of "random" weapon fire)
|
||||
if ((pm->ps->weapon == WP_AKIMBO || pm->ps->weapon == WP_AKIMBO_MP40 || pm->ps->weapon == WP_AKIMBO_THOMPSON) && !triggerState) {
|
||||
pm->ps->weaponTime = 0;
|
||||
pm->ps->weaponDelay = 0;
|
||||
|
||||
if ( weaponstateFiring ) { // you were just firing, time to relax
|
||||
PM_ContinueWeaponAnim( WEAP_IDLE1 );
|
||||
}
|
||||
|
||||
pm->ps->weaponstate = WEAPON_READY;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( gameReloading ) {
|
||||
return;
|
||||
|
@ -3145,7 +3290,9 @@ default:
|
|||
break;
|
||||
// machineguns should continue the anim, rather than start each fire
|
||||
case WP_MP40:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_THOMPSON:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
case WP_STEN:
|
||||
case WP_VENOM:
|
||||
case WP_FG42:
|
||||
|
@ -3251,6 +3398,18 @@ if ( pm->ps->weapon ) {
|
|||
playswitchsound = qfalse;
|
||||
break;
|
||||
|
||||
case WP_AKIMBO:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
// do not reload but continue fire if there is ammo in other gun
|
||||
if (pm->ps->ammoclip[pm->ps->weapon] || pm->ps->ammoclip[weapAlts[pm->ps->weapon]]) {
|
||||
reloadingW = qfalse;
|
||||
playswitchsound = qfalse;
|
||||
// notify player that one gun is empty
|
||||
PM_AddEvent( EV_EMPTYCLIP );
|
||||
}
|
||||
break;
|
||||
|
||||
// some weapons not allowed to reload. must switch back to primary first
|
||||
case WP_SNOOPERSCOPE:
|
||||
case WP_SNIPERRIFLE:
|
||||
|
@ -3306,18 +3465,10 @@ if ( ammoTable[pm->ps->weapon].maxHeat ) {
|
|||
|
||||
// if this was the last round in the clip, play the 'lastshot' animation
|
||||
// this animation has the weapon in a "ready to reload" state
|
||||
if ( pm->ps->weapon == WP_AKIMBO ) {
|
||||
if ( akimboFire ) {
|
||||
weapattackanim = WEAP_ATTACK1; // attack1 is right hand
|
||||
} else {
|
||||
weapattackanim = WEAP_ATTACK2; // attack2 is left hand
|
||||
}
|
||||
if ( PM_WeaponClipEmpty( pm->ps->weapon ) ) {
|
||||
weapattackanim = WEAP_ATTACK_LASTSHOT;
|
||||
} else {
|
||||
if ( PM_WeaponClipEmpty( pm->ps->weapon ) ) {
|
||||
weapattackanim = WEAP_ATTACK_LASTSHOT;
|
||||
} else {
|
||||
weapattackanim = WEAP_ATTACK1;
|
||||
}
|
||||
weapattackanim = WEAP_ATTACK1;
|
||||
}
|
||||
|
||||
switch ( pm->ps->weapon ) {
|
||||
|
@ -3333,7 +3484,9 @@ case WP_DYNAMITE:
|
|||
|
||||
case WP_VENOM:
|
||||
case WP_MP40:
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_THOMPSON:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
case WP_STEN:
|
||||
PM_ContinueWeaponAnim( weapattackanim );
|
||||
break;
|
||||
|
@ -3347,9 +3500,9 @@ default:
|
|||
|
||||
|
||||
|
||||
if ( pm->ps->weapon == WP_AKIMBO ) {
|
||||
if ( pm->ps->weapon == WP_AKIMBO && !akimboFire ) {
|
||||
PM_AddEvent( EV_FIRE_WEAPONB ); // really firing colt
|
||||
if ( pm->ps->weapon == WP_AKIMBO || pm->ps->weapon == WP_AKIMBO_MP40 || pm->ps->weapon == WP_AKIMBO_THOMPSON ) {
|
||||
if ( !akimboFire ) {
|
||||
PM_AddEvent( EV_FIRE_WEAPONB ); // really firing main
|
||||
} else {
|
||||
PM_AddEvent( EV_FIRE_WEAPON );
|
||||
}
|
||||
|
@ -3395,19 +3548,36 @@ case WP_COLT:
|
|||
|
||||
//----(SA) added
|
||||
case WP_AKIMBO:
|
||||
// if you're firing an akimbo colt, and your other gun is dry,
|
||||
// nextshot needs to take 2x time
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
// if you're firing an akimbo, and you are firing only single gun,
|
||||
// or other gun is dry, nextshot needs to take 2x time
|
||||
|
||||
addTime = ammoTable[pm->ps->weapon].nextShotTime;
|
||||
|
||||
// (SA) (added check for last shot in both guns so there's no delay for the last shot)
|
||||
if ( !pm->ps->ammoclip[WP_AKIMBO] || !pm->ps->ammoclip[WP_COLT] ) {
|
||||
if ( ( !pm->ps->ammoclip[WP_AKIMBO] && !akimboFire ) || ( !pm->ps->ammoclip[WP_COLT] && akimboFire ) ) {
|
||||
addTime = 2 * ammoTable[pm->ps->weapon].nextShotTime;
|
||||
if (triggerState < 3) {
|
||||
// firing only single gun
|
||||
addTime = ammoTable[weapAlts[pm->ps->weapon]].nextShotTime;
|
||||
} else {
|
||||
// (SA) (added check for last shot in both guns so there's no delay for the last shot)
|
||||
if ( !pm->ps->ammoclip[pm->ps->weapon] || !pm->ps->ammoclip[weapAlts[pm->ps->weapon]] ) {
|
||||
if ( ( !pm->ps->ammoclip[pm->ps->weapon] && !akimboFire ) || ( !pm->ps->ammoclip[weapAlts[pm->ps->weapon]] && akimboFire ) ) {
|
||||
addTime = ammoTable[weapAlts[pm->ps->weapon]].nextShotTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
aimSpreadScaleAdd = 20;
|
||||
switch ( pm->ps->weapon ) {
|
||||
case WP_AKIMBO:
|
||||
aimSpreadScaleAdd = 20;
|
||||
break;
|
||||
case WP_AKIMBO_MP40:
|
||||
aimSpreadScaleAdd = 15 + rand() % 10;
|
||||
break;
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
aimSpreadScaleAdd = 15 + rand() % 10;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
//----(SA) end
|
||||
|
||||
|
|
|
@ -578,22 +578,24 @@ typedef enum {
|
|||
// WP_CROSS, // 29
|
||||
WP_DYNAMITE, // 22
|
||||
// WP_DYNAMITE2, // 31
|
||||
WP_AKIMBO_MP40, // 23 // dual MP40
|
||||
WP_AKIMBO_THOMPSON, // 24 // dual thompson
|
||||
// WP_PROX, // 32
|
||||
|
||||
WP_MONSTER_ATTACK1, // 23 // generic monster attack, slot 1
|
||||
WP_MONSTER_ATTACK2, // 24 // generic monster attack, slot 2
|
||||
WP_MONSTER_ATTACK3, // 25 // generic monster attack, slot 2
|
||||
WP_MONSTER_ATTACK1, // 25 // generic monster attack, slot 1
|
||||
WP_MONSTER_ATTACK2, // 26 // generic monster attack, slot 2
|
||||
WP_MONSTER_ATTACK3, // 27 // generic monster attack, slot 2
|
||||
|
||||
WP_GAUNTLET, // 26
|
||||
WP_GAUNTLET, // 28
|
||||
|
||||
WP_SNIPER, // 27
|
||||
WP_GRENADE_SMOKE, // 28 // smoke grenade for LT multiplayer
|
||||
WP_MEDIC_HEAL, // 29 // DHM - Nerve :: Medic special weapon
|
||||
WP_MORTAR, // 30
|
||||
WP_SNIPER, // 29
|
||||
WP_GRENADE_SMOKE, // 30 // smoke grenade for LT multiplayer
|
||||
WP_MEDIC_HEAL, // 31 // DHM - Nerve :: Medic special weapon
|
||||
WP_MORTAR, // 32
|
||||
|
||||
VERYBIGEXPLOSION, // 31 // explosion effect for airplanes
|
||||
VERYBIGEXPLOSION, // 33 // explosion effect for airplanes
|
||||
|
||||
WP_NUM_WEAPONS // 32 NOTE: this cannot be larger than 64 for AI/player weapons!
|
||||
WP_NUM_WEAPONS // 34 NOTE: this cannot be larger than 64 for AI/player weapons!
|
||||
|
||||
} weapon_t;
|
||||
|
||||
|
@ -615,6 +617,51 @@ typedef struct ammotable_s {
|
|||
extern ammotable_t ammoTable[]; // defined in bg_misc.c
|
||||
extern int weapAlts[]; // defined in bg_misc.c
|
||||
|
||||
static const int SELECTABLE_WEAPONS_NUM = 13;
|
||||
static const int SELECTABLE_WEAPONS[] = {
|
||||
// order matches prev/next selector
|
||||
WP_KNIFE,
|
||||
WP_LUGER,
|
||||
WP_COLT,
|
||||
WP_MP40,
|
||||
WP_THOMPSON,
|
||||
WP_STEN,
|
||||
WP_MAUSER,
|
||||
WP_GARAND,
|
||||
WP_FG42,
|
||||
WP_PANZERFAUST,
|
||||
WP_VENOM,
|
||||
WP_FLAMETHROWER,
|
||||
WP_TESLA
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WST_WEAPON,
|
||||
WST_ITEM,
|
||||
WST_SYSTEM,
|
||||
NUM_WST
|
||||
} wheelSelectorType_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WSI_BINOCULARS,
|
||||
WSI_GRENADE,
|
||||
WSI_PINEAPPLE,
|
||||
WSI_DYNAMITE,
|
||||
WSI_WINE,
|
||||
WSI_STAMINA,
|
||||
WSI_VBOOK,
|
||||
WSI_PBOOK,
|
||||
WSI_ZBOOK
|
||||
} itemSelectorItems_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
WSI_EXIT_MENU,
|
||||
WSI_QUICK_SAVE,
|
||||
WSI_QUICK_LOAD
|
||||
} systemSelectorItems_t;
|
||||
|
||||
//----(SA)
|
||||
// for routines that need to check if a WP_ is </=/> a given set of weapons
|
||||
|
@ -1145,7 +1192,9 @@ typedef enum {
|
|||
MOD_LUGER,
|
||||
MOD_COLT,
|
||||
MOD_MP40,
|
||||
MOD_AKIMBO_MP40,
|
||||
MOD_THOMPSON,
|
||||
MOD_AKIMBO_THOMPSON,
|
||||
MOD_STEN,
|
||||
MOD_MAUSER,
|
||||
MOD_SNIPERRIFLE,
|
||||
|
@ -1267,7 +1316,7 @@ gitem_t *BG_FindItemForKey( wkey_t k, int *index );
|
|||
weapon_t BG_FindAmmoForWeapon( weapon_t weapon );
|
||||
weapon_t BG_FindClipForWeapon( weapon_t weapon );
|
||||
|
||||
qboolean BG_AkimboFireSequence( int weapon, int akimboClip, int coltClip );
|
||||
qboolean BG_AkimboFireSequence( int weapon, int akimboClip, int mainClip, int triggerState );
|
||||
//qboolean BG_AkimboFireSequence ( playerState_t *ps ); //----(SA) added
|
||||
|
||||
#define ITEM_INDEX( x ) ( ( x ) - bg_itemlist )
|
||||
|
|
|
@ -152,9 +152,11 @@ void P_DamageFeedback( gentity_t *player ) {
|
|||
trap_Vibrate(1000, 1, (count / 255.0) + 0.5f, "damage_low_bullet", yaw, pitch);
|
||||
break;
|
||||
case MOD_THOMPSON:
|
||||
case MOD_AKIMBO_THOMPSON:
|
||||
case MOD_STEN:
|
||||
case MOD_MAUSER:
|
||||
case MOD_MP40:
|
||||
case MOD_AKIMBO_MP40:
|
||||
case MOD_GARAND:
|
||||
case MOD_SPEARGUN:
|
||||
case MOD_CROSS:
|
||||
|
@ -540,6 +542,9 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) {
|
|||
if ( client->latched_buttons & BUTTON_ACTIVATE ) {
|
||||
Cmd_Activate_f( ent );
|
||||
}
|
||||
if ( client->latched_wbuttons & WBUTTON_ACTIVATE2 ) {
|
||||
Cmd_Activate2_f( ent );
|
||||
}
|
||||
|
||||
// save results of pmove
|
||||
VectorCopy( client->ps.origin, ent->s.origin );
|
||||
|
@ -1511,6 +1516,9 @@ void ClientThink_real( gentity_t *ent ) {
|
|||
if ( client->latched_buttons & BUTTON_ACTIVATE ) {
|
||||
Cmd_Activate_f( ent );
|
||||
}
|
||||
if ( client->latched_wbuttons & WBUTTON_ACTIVATE2 ) {
|
||||
Cmd_Activate2_f( ent );
|
||||
}
|
||||
|
||||
if ( ent->flags & FL_NOFATIGUE ) {
|
||||
ent->client->ps.sprintTime = 20000;
|
||||
|
|
|
@ -163,8 +163,8 @@ void alarmbox_use( gentity_t *ent, gentity_t *other, gentity_t *foo ) {
|
|||
alarmbox_updateparts( ent, qtrue );
|
||||
if ( other->client ) {
|
||||
G_AddEvent( ent, EV_GENERAL_SOUND, ent->soundPos3 );
|
||||
//TODO GB Add heartbeat
|
||||
trap_Haptic(1, 0, 1.0f, "alarm_on", 0.0f, 0.0f);
|
||||
// Replaced by "use trigger" haptics
|
||||
//trap_Haptic(1, 0, 1.0f, "alarm_on", 0.0f, 0.0f);
|
||||
}
|
||||
// G_Printf("touched alarmbox\n");
|
||||
|
||||
|
@ -185,7 +185,8 @@ void alarmbox_die( gentity_t *ent, gentity_t *inflictor, gentity_t *attacker, in
|
|||
ent->takedamage = qfalse;
|
||||
alarmbox_updateparts( ent, qtrue );
|
||||
|
||||
trap_Haptic(1, 0, 1.0f, "end_alarm", 0.0f, 0.0f);
|
||||
// Replaced by "use trigger" haptics
|
||||
//trap_Haptic(1, 0, 1.0f, "end_alarm", 0.0f, 0.0f);
|
||||
|
||||
// fire 'death' targets
|
||||
if ( ent->targetdeath ) {
|
||||
|
|
|
@ -100,10 +100,10 @@ CheatsOk
|
|||
==================
|
||||
*/
|
||||
qboolean CheatsOk( gentity_t *ent ) {
|
||||
if ( !g_cheats.integer ) {
|
||||
trap_SendServerCommand( ent - g_entities, va( "print \"Cheats are not enabled on this server.\n\"" ) );
|
||||
return qfalse;
|
||||
}
|
||||
//if ( !g_cheats.integer ) {
|
||||
// trap_SendServerCommand( ent - g_entities, va( "print \"Cheats are not enabled on this server.\n\"" ) );
|
||||
// return qfalse;
|
||||
//}
|
||||
if ( ent->health <= 0 ) {
|
||||
trap_SendServerCommand( ent - g_entities, va( "print \"You must be alive to use this command.\n\"" ) );
|
||||
return qfalse;
|
||||
|
@ -289,8 +289,8 @@ void Cmd_Give_f( gentity_t *ent ) {
|
|||
if ( give_all || Q_stricmp( name, "weapons" ) == 0 ) {
|
||||
//ent->client->ps.weapons[0] = (1 << (WP_MONSTER_ATTACK1)) - 1 - (1<<WP_NONE); //----(SA) gives the cross now as well
|
||||
|
||||
//(SA) we really don't want to give anything beyond WP_DYNAMITE
|
||||
for ( i = 0; i <= WP_DYNAMITE; i++ )
|
||||
//(SA) we really don't want to give anything beyond WP_AKIMBO_THOMPSON
|
||||
for ( i = 0; i <= WP_AKIMBO_THOMPSON; i++ )
|
||||
COM_BitSet( ent->client->ps.weapons, i );
|
||||
|
||||
// for (i=0; i<WP_NUM_WEAPONS; i++) {
|
||||
|
@ -1366,10 +1366,36 @@ Cmd_Activate_f
|
|||
==================
|
||||
*/
|
||||
void Cmd_Activate_f( gentity_t *ent ) {
|
||||
vec3_t forward, right, up, offset, end;
|
||||
|
||||
if (ent->s.number == 0 && trap_Cvar_VariableIntegerValue("vr_gesture_triggered_use")) {
|
||||
CalcMuzzlePointForHandActivate(ent, qfalse, offset, forward, end);
|
||||
Cmd_ActivateInternal_f(ent, offset, forward, end, qfalse);
|
||||
} else {
|
||||
AngleVectors( ent->client->ps.viewangles, forward, right, up );
|
||||
CalcMuzzlePointForActivate( ent, forward, right, up, offset );
|
||||
VectorMA( offset, 96, forward, end );
|
||||
Cmd_ActivateInternal_f(ent, offset, forward, end, qfalse);
|
||||
}
|
||||
}
|
||||
|
||||
void Cmd_Activate2_f( gentity_t *ent ) {
|
||||
vec3_t forward, right, up, offset, end;
|
||||
|
||||
if (ent->s.number == 0 && trap_Cvar_VariableIntegerValue("vr_gesture_triggered_use")) {
|
||||
CalcMuzzlePointForHandActivate(ent, qtrue, offset, forward, end);
|
||||
Cmd_ActivateInternal_f(ent, offset, forward, end, qtrue);
|
||||
} else {
|
||||
AngleVectors( ent->client->ps.viewangles, forward, right, up );
|
||||
CalcMuzzlePointForActivate( ent, forward, right, up, offset );
|
||||
VectorMA( offset, 96, forward, end );
|
||||
Cmd_ActivateInternal_f(ent, offset, forward, end, qfalse);
|
||||
}
|
||||
}
|
||||
|
||||
void Cmd_ActivateInternal_f( gentity_t *ent, vec3_t offset, vec3_t forward, vec3_t end, qboolean offhand ) {
|
||||
trace_t tr;
|
||||
vec3_t end;
|
||||
gentity_t *traceEnt;
|
||||
vec3_t forward, right, up, offset;
|
||||
static int oldactivatetime = 0;
|
||||
int activatetime = level.time;
|
||||
qboolean walking = qfalse;
|
||||
|
@ -1378,12 +1404,6 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
walking = qtrue;
|
||||
}
|
||||
|
||||
AngleVectors( ent->client->ps.viewangles, forward, right, up );
|
||||
|
||||
CalcMuzzlePointForActivate( ent, forward, right, up, offset );
|
||||
|
||||
VectorMA( offset, 96, forward, end );
|
||||
|
||||
trap_Trace( &tr, offset, NULL, NULL, end, ent->s.number, ( CONTENTS_SOLID | CONTENTS_BODY | CONTENTS_CORPSE | CONTENTS_TRIGGER ) );
|
||||
|
||||
//----(SA) removed erroneous code
|
||||
|
@ -1395,9 +1415,15 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
traceEnt = &g_entities[ tr.entityNum ];
|
||||
|
||||
// G_Printf( "%s activate %s\n", ent->classname, traceEnt->classname);
|
||||
int controlScheme = trap_Cvar_VariableIntegerValue("vr_control_scheme");
|
||||
qboolean rightHanded = controlScheme < 10 || controlScheme == 99;
|
||||
int hapticChannel = offhand ? (rightHanded ? 0 : 1) : (rightHanded ? 1 : 0);
|
||||
|
||||
// Ridah, check for using a friendly AI
|
||||
if ( traceEnt->aiCharacter ) {
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
AICast_Activate( ent->s.number, traceEnt->s.number );
|
||||
return;
|
||||
}
|
||||
|
@ -1411,11 +1437,17 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
if ( walking || 1 == 1) {
|
||||
traceEnt->flags |= FL_SOFTACTIVATE; // no noise
|
||||
}
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
G_TryDoor( traceEnt, ent, ent ); // (door,other,activator)
|
||||
//----(SA) end
|
||||
} else if ( ( Q_stricmp( traceEnt->classname, "func_button" ) == 0 )
|
||||
&& ( traceEnt->s.apos.trType == TR_STATIONARY && traceEnt->s.pos.trType == TR_STATIONARY )
|
||||
&& traceEnt->active == qfalse ) {
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
G_TryDoor( traceEnt, ent, ent ); // (door,other,activator)
|
||||
// Use_BinaryMover (traceEnt, ent, ent);
|
||||
// traceEnt->active = qtrue;
|
||||
|
@ -1423,10 +1455,19 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
if ( walking || 1 == 1) {
|
||||
traceEnt->flags |= FL_SOFTACTIVATE; // no noise
|
||||
}
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
traceEnt->use( traceEnt, ent, ent );
|
||||
} else if ( !Q_stricmp( traceEnt->classname, "props_footlocker" ) ) {
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
traceEnt->use( traceEnt, ent, ent );
|
||||
} else if ( !Q_stricmp( traceEnt->classname, "script_mover" ) ) {
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
G_Script_ScriptEvent( traceEnt, "activate", ent->aiName );
|
||||
} else if ( traceEnt->s.eType == ET_ALARMBOX ) {
|
||||
trace_t trace;
|
||||
|
@ -1438,6 +1479,9 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
memset( &trace, 0, sizeof( trace ) );
|
||||
|
||||
if ( traceEnt->use ) {
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
traceEnt->use( traceEnt, ent, 0 );
|
||||
}
|
||||
} else if ( traceEnt->s.eType == ET_ITEM ) {
|
||||
|
@ -1453,6 +1497,9 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
if ( ent->client->pers.autoActivate == PICKUP_ACTIVATE ) {
|
||||
ent->client->pers.autoActivate = PICKUP_FORCE; //----(SA) force the pickup of a normally autoactivate only item
|
||||
}
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
traceEnt->active = qtrue;
|
||||
traceEnt->touch( traceEnt, ent, &trace );
|
||||
}
|
||||
|
@ -1489,6 +1536,9 @@ void Cmd_Activate_f( gentity_t *ent ) {
|
|||
VectorCopy( traceEnt->s.angles, traceEnt->TargetAngles );
|
||||
|
||||
if ( !( ent->r.svFlags & SVF_CASTAI ) ) {
|
||||
if (ent->s.number == 0) {
|
||||
trap_Vibrate(1, hapticChannel, 0.5f, "use_trigger", 0, 0);
|
||||
}
|
||||
G_UseTargets( traceEnt, ent ); //----(SA) added for Mike so mounting an MG42 can be a trigger event (let me know if there's any issues with this)
|
||||
|
||||
}
|
||||
|
|
|
@ -127,6 +127,12 @@ void TossClientItems( gentity_t *self ) {
|
|||
if ( weapon == WP_AKIMBO ) { //----(SA) added
|
||||
weapon = WP_COLT;
|
||||
}
|
||||
if ( weapon == WP_AKIMBO_MP40 ) { //----(SA) added
|
||||
weapon = WP_MP40;
|
||||
}
|
||||
if ( weapon == WP_AKIMBO_THOMPSON ) { //----(SA) added
|
||||
weapon = WP_THOMPSON;
|
||||
}
|
||||
//----(SA) end
|
||||
|
||||
|
||||
|
@ -273,7 +279,9 @@ char *modNames[] = {
|
|||
"MOD_LUGER",
|
||||
"MOD_COLT",
|
||||
"MOD_MP40",
|
||||
"MOD_AKIMBO_MP40",
|
||||
"MOD_THOMPSON",
|
||||
"MOD_AKIMBO_THOMPSON",
|
||||
"MOD_STEN",
|
||||
"MOD_MAUSER",
|
||||
"MOD_SNIPERRIFLE",
|
||||
|
@ -674,7 +682,9 @@ qboolean IsHeadShotWeapon( int mod, gentity_t *targ, gentity_t *attacker ) {
|
|||
case MOD_COLT:
|
||||
case MOD_AKIMBO:
|
||||
case MOD_MP40:
|
||||
case MOD_AKIMBO_MP40:
|
||||
case MOD_THOMPSON:
|
||||
case MOD_AKIMBO_THOMPSON:
|
||||
case MOD_STEN:
|
||||
case MOD_BAR:
|
||||
case MOD_FG42:
|
||||
|
|
|
@ -1092,7 +1092,7 @@ extern gitem_t * BG_FindItem2 ( const char * name ) ;
|
|||
extern gitem_t * BG_FindItem ( const char * pickupName ) ;
|
||||
extern gitem_t * BG_FindItemForAmmo ( int ammo ) ;
|
||||
extern gitem_t * BG_FindItemForKey ( wkey_t k , int * indexreturn ) ;
|
||||
extern qboolean BG_AkimboFireSequence ( int weapon , int akimboClip , int coltClip ) ;
|
||||
extern qboolean BG_AkimboFireSequence ( int weapon , int akimboClip , int coltClip, int triggerState ) ;
|
||||
extern weapon_t BG_FindAmmoForWeapon ( weapon_t weapon ) ;
|
||||
extern weapon_t BG_FindClipForWeapon ( weapon_t weapon ) ;
|
||||
extern gitem_t * BG_FindItemForWeapon ( weapon_t weapon ) ;
|
||||
|
@ -1108,6 +1108,7 @@ extern void Cmd_ClientDamage_f ( gentity_t * clent ) ;
|
|||
extern void ClientDamage ( gentity_t * clent , int entnum , int enemynum , int id ) ;
|
||||
extern int Cmd_WolfKick_f ( gentity_t * ent ) ;
|
||||
extern void Cmd_Activate_f ( gentity_t * ent ) ;
|
||||
extern void Cmd_Activate2_f ( gentity_t * ent ) ;
|
||||
extern qboolean G_ThrowChair ( gentity_t * ent , vec3_t dir , qboolean force ) ;
|
||||
extern void Cmd_InterruptCamera_f ( gentity_t * ent ) ;
|
||||
extern void Cmd_SetCameraOrigin_f ( gentity_t * ent ) ;
|
||||
|
|
|
@ -1108,6 +1108,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
{"ClientDamage", (byte *)ClientDamage},
|
||||
{"Cmd_WolfKick_f", (byte *)Cmd_WolfKick_f},
|
||||
{"Cmd_Activate_f", (byte *)Cmd_Activate_f},
|
||||
{"Cmd_Activate2_f", (byte *)Cmd_Activate2_f},
|
||||
{"G_ThrowChair", (byte *)G_ThrowChair},
|
||||
{"Cmd_InterruptCamera_f", (byte *)Cmd_InterruptCamera_f},
|
||||
{"Cmd_SetCameraOrigin_f", (byte *)Cmd_SetCameraOrigin_f},
|
||||
|
|
|
@ -442,10 +442,10 @@ int Pickup_Weapon( gentity_t *ent, gentity_t *other ) {
|
|||
|
||||
|
||||
//----(SA) added
|
||||
// check for special colt->akimbo add (if you've got a colt already, add the second now)
|
||||
if ( weapon == WP_COLT ) {
|
||||
if ( COM_BitCheck( other->client->ps.weapons, WP_COLT ) ) {
|
||||
weapon = WP_AKIMBO;
|
||||
// check for special gun->akimbo add (if you've got a gun already, add the second now)
|
||||
if ( weapon == WP_COLT || weapon == WP_MP40 || weapon == WP_THOMPSON ) {
|
||||
if ( COM_BitCheck( other->client->ps.weapons, weapon ) ) {
|
||||
weapon = weapAlts[weapon];
|
||||
}
|
||||
}
|
||||
//----(SA) end
|
||||
|
|
|
@ -916,6 +916,7 @@ void CalcMuzzlePoints( gentity_t *ent, int weapon );
|
|||
|
||||
// Rafael - for activate
|
||||
void CalcMuzzlePointForActivate( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up, vec3_t muzzlePoint );
|
||||
void CalcMuzzlePointForHandActivate( gentity_t *ent, qboolean offHand, vec3_t offset, vec3_t forward, vec3_t end );
|
||||
// done.
|
||||
|
||||
//
|
||||
|
@ -1052,6 +1053,8 @@ void BotTestAAS( vec3_t origin );
|
|||
|
||||
// g_cmd.c
|
||||
void Cmd_Activate_f( gentity_t *ent );
|
||||
void Cmd_Activate2_f( gentity_t *ent );
|
||||
void Cmd_ActivateInternal_f( gentity_t *ent, vec3_t offset, vec3_t forward, vec3_t end, qboolean offhand );
|
||||
int Cmd_WolfKick_f( gentity_t *ent );
|
||||
// Ridah
|
||||
|
||||
|
|
|
@ -2212,11 +2212,13 @@ void G_TryDoor( gentity_t *ent, gentity_t *other, gentity_t *activator ) {
|
|||
ent->active = qtrue;
|
||||
if ( walking || 1 == 1) {
|
||||
ent->flags |= FL_SOFTACTIVATE; // no noise
|
||||
if(gVR)
|
||||
trap_Vibrate(1, gVR->right_handed ? 0 : 1, 0.3f, "door_open", 0, 0); //I've reversed the hands as I presume you will open it with the hand your gun isn't in.
|
||||
// Replaced by "use trigger" haptics
|
||||
//if(gVR)
|
||||
// trap_Vibrate(1, gVR->right_handed ? 0 : 1, 0.3f, "door_open", 0, 0); //I've reversed the hands as I presume you will open it with the hand your gun isn't in.
|
||||
} else {
|
||||
if(gVR)
|
||||
trap_Vibrate(1, gVR->right_handed ? 0 : 1, 0.5f, "door_open", 0, 0); //I've reversed the hands as I presume you will open it with the hand your gun isn't in.
|
||||
// Replaced by "use trigger" haptics
|
||||
//if(gVR)
|
||||
// trap_Vibrate(1, gVR->right_handed ? 0 : 1, 0.5f, "door_open", 0, 0); //I've reversed the hands as I presume you will open it with the hand your gun isn't in.
|
||||
if ( activator ) {
|
||||
soundrange = HEAR_RANGE_DOOR_OPEN;
|
||||
}
|
||||
|
|
|
@ -627,7 +627,9 @@ int G_GetWeaponDamage( int weapon ) {
|
|||
case WP_COLT:
|
||||
case WP_AKIMBO: return 10; //---- Make pistols a little more powerful for VR
|
||||
case WP_VENOM: return 12; // 15 ----(SA) slight modify for DM
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_MP40: return 6;
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
case WP_THOMPSON: return 8;
|
||||
case WP_STEN: return 10;
|
||||
case WP_FG42SCOPE:
|
||||
|
@ -657,7 +659,9 @@ int G_GetWeaponDamage( int weapon ) {
|
|||
case WP_AKIMBO: return 18; //----(SA) added
|
||||
case WP_VENOM: return 20;
|
||||
case WP_MP40: return 14;
|
||||
case WP_AKIMBO_MP40: return 14;
|
||||
case WP_THOMPSON: return 18;
|
||||
case WP_AKIMBO_THOMPSON: return 18;
|
||||
case WP_STEN: return 14;
|
||||
case WP_FG42SCOPE:
|
||||
case WP_FG42: return 15;
|
||||
|
@ -701,9 +705,11 @@ float G_GetWeaponSpread( int weapon ) {
|
|||
case WP_AKIMBO: return 10;
|
||||
case WP_VENOM: return 1000;
|
||||
case WP_MP40: return 800;
|
||||
case WP_AKIMBO_MP40: return 800;
|
||||
case WP_FG42SCOPE: return 100;
|
||||
case WP_FG42: return 200;
|
||||
case WP_THOMPSON: return 1000;
|
||||
case WP_AKIMBO_THOMPSON: return 1000;
|
||||
case WP_STEN: return 800;//1200; Improve accuracy of Sten for more fun on stealth missions
|
||||
case WP_MAUSER: return 200;
|
||||
case WP_GARAND: return 500;
|
||||
|
@ -718,9 +724,11 @@ float G_GetWeaponSpread( int weapon ) {
|
|||
case WP_AKIMBO: return 30; //----(SA) added
|
||||
case WP_VENOM: return 200;
|
||||
case WP_MP40: return 200;
|
||||
case WP_AKIMBO_MP40: return 200;
|
||||
case WP_FG42SCOPE: return 10;
|
||||
case WP_FG42: return 150;
|
||||
case WP_THOMPSON: return 250;
|
||||
case WP_AKIMBO_THOMPSON: return 250;
|
||||
case WP_STEN: return 300;
|
||||
case WP_MAUSER: return 15;
|
||||
case WP_GARAND: return 25;
|
||||
|
@ -736,9 +744,11 @@ float G_GetWeaponSpread( int weapon ) {
|
|||
case WP_AKIMBO: return 800; //----(SA)added
|
||||
case WP_VENOM: return 600;
|
||||
case WP_MP40: return 400;
|
||||
case WP_AKIMBO_MP40: return 400;
|
||||
case WP_FG42SCOPE:
|
||||
case WP_FG42: return 500;
|
||||
case WP_THOMPSON: return 600;
|
||||
case WP_AKIMBO_THOMPSON: return 600;
|
||||
case WP_STEN: return 200;
|
||||
case WP_MAUSER: return 700;
|
||||
case WP_GARAND: return 600;
|
||||
|
@ -966,11 +976,11 @@ void Bullet_Fire( gentity_t *ent, float spread, int damage ) {
|
|||
// Allocates storage
|
||||
char *fire_command = (char*)malloc(8 * sizeof(char));
|
||||
sprintf(fire_command, "fire_%i", ent->s.weapon);
|
||||
if (ent->s.weapon == WP_AKIMBO)
|
||||
if (ent->s.weapon == WP_AKIMBO || ent->s.weapon == WP_AKIMBO_MP40 || ent->s.weapon == WP_AKIMBO_THOMPSON)
|
||||
{
|
||||
right = BG_AkimboFireSequence(ent->s.weapon, ent->client->ps.ammoclip[WP_AKIMBO], ent->client->ps.ammoclip[WP_COLT] );
|
||||
trap_Vibrate(100, right ? 1 : 0, 1.0, fire_command, 0.0, 0.0);
|
||||
} else{
|
||||
qboolean akimbo = BG_AkimboFireSequence(ent->s.weapon, ent->client->ps.ammoclip[ent->s.weapon], ent->client->ps.ammoclip[weapAlts[ent->s.weapon]], gVR->akimboTriggerState );
|
||||
trap_Vibrate(100, right != akimbo ? 1 : 0, 1.0, fire_command, 0.0, 0.0);
|
||||
} else {
|
||||
trap_Vibrate(100, right ? 1 : 0, 1.0, fire_command, 0.0, 0.0);
|
||||
if (gVR->weapon_stabilised) {
|
||||
trap_Vibrate(100, right ? 0 : 1, 0.7, fire_command, 0.0, 0.0);
|
||||
|
@ -1746,8 +1756,20 @@ void CalcMuzzlePoint( gentity_t *ent, int weapon, vec3_t forward, vec3_t right,
|
|||
float worldscale = trap_Cvar_VariableIntegerValue("cg_worldScale");
|
||||
float heightAdjust = 0;
|
||||
trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust);
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
muzzlePoint[2] += (ent->client->ps.viewheight - 64);
|
||||
if (weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON) {
|
||||
if (BG_AkimboFireSequence(weapon, ent->client->ps.ammoclip[weapon], ent->client->ps.ammoclip[weapAlts[weapon]], gVR->akimboTriggerState)) {
|
||||
convertFromVR(worldscale, ent, gVR->offhandoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
} else {
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
}
|
||||
} else {
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
}
|
||||
if (gVR->vrIrlCrouchEnabled) {
|
||||
muzzlePoint[2] += (gVR->viewHeight - 64);
|
||||
} else {
|
||||
muzzlePoint[2] += (ent->client->ps.viewheight - 64);
|
||||
}
|
||||
muzzlePoint[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale;
|
||||
return;
|
||||
}
|
||||
|
@ -1773,9 +1795,6 @@ void CalcMuzzlePoint( gentity_t *ent, int weapon, vec3_t forward, vec3_t right,
|
|||
case WP_GRENADE_LAUNCHER:
|
||||
VectorMA( muzzlePoint, 20, right, muzzlePoint );
|
||||
break;
|
||||
case WP_AKIMBO: // left side rather than right
|
||||
VectorMA( muzzlePoint, -6, right, muzzlePoint );
|
||||
VectorMA( muzzlePoint, -4, up, muzzlePoint );
|
||||
default:
|
||||
VectorMA( muzzlePoint, 6, right, muzzlePoint );
|
||||
VectorMA( muzzlePoint, -4, up, muzzlePoint );
|
||||
|
@ -1807,8 +1826,21 @@ void CalcMuzzlePointForActivate( gentity_t *ent, vec3_t forward, vec3_t right, v
|
|||
float worldscale = trap_Cvar_VariableIntegerValue("cg_worldScale");
|
||||
float heightAdjust = 0;
|
||||
trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust);
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
muzzlePoint[2] += (ent->client->ps.viewheight - 64);
|
||||
int weapon = ent->client->ps.weapon;
|
||||
if (weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON) {
|
||||
if (BG_AkimboFireSequence(weapon, ent->client->ps.ammoclip[weapon], ent->client->ps.ammoclip[weapAlts[weapon]], gVR->akimboTriggerState)) {
|
||||
convertFromVR(worldscale, ent, gVR->offhandoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
} else {
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
}
|
||||
} else {
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, muzzlePoint);
|
||||
}
|
||||
if (gVR->vrIrlCrouchEnabled) {
|
||||
muzzlePoint[2] += (gVR->viewHeight - 64);
|
||||
} else {
|
||||
muzzlePoint[2] += (ent->client->ps.viewheight - 64);
|
||||
}
|
||||
muzzlePoint[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale;
|
||||
return;
|
||||
}
|
||||
|
@ -1816,6 +1848,32 @@ void CalcMuzzlePointForActivate( gentity_t *ent, vec3_t forward, vec3_t right, v
|
|||
// done.
|
||||
|
||||
|
||||
|
||||
void CalcMuzzlePointForHandActivate( gentity_t *ent, qboolean offHand, vec3_t offset, vec3_t forward, vec3_t end ) {
|
||||
vec3_t angles, right, up;
|
||||
if (gVR != NULL)
|
||||
{
|
||||
float worldscale = 0;
|
||||
trap_Cvar_VariableValue("cg_worldScale", &worldscale);
|
||||
float heightAdjust = 0;
|
||||
trap_Cvar_VariableValue("cg_heightAdjust", &heightAdjust);
|
||||
if (offHand) {
|
||||
convertFromVR(worldscale, ent, gVR->offhandoffset, ent->r.currentOrigin, offset);
|
||||
VectorCopy(gVR->offhandangles, angles);
|
||||
} else {
|
||||
convertFromVR(worldscale, ent, gVR->calculated_weaponoffset, ent->r.currentOrigin, offset);
|
||||
VectorCopy(gVR->dominanthandangles, angles);
|
||||
}
|
||||
offset[2] -= 24;
|
||||
offset[2] += (gVR->hmdposition[1] + heightAdjust) * worldscale;
|
||||
angles[YAW] += ent->client->ps.viewangles[YAW] - gVR->hmdorientation[YAW];
|
||||
AngleVectors( angles, forward, right, up );
|
||||
VectorMA( offset, 24, forward, end );
|
||||
// start trace between body and hand to avoid reaching through
|
||||
VectorMA( offset, -8, forward, offset );
|
||||
}
|
||||
}
|
||||
|
||||
// Ridah
|
||||
void CalcMuzzlePoints( gentity_t *ent, int weapon ) {
|
||||
vec3_t viewang;
|
||||
|
@ -1837,10 +1895,18 @@ void CalcMuzzlePoints( gentity_t *ent, int weapon ) {
|
|||
phase = level.time / 1000.0 * ZOOM_YAW_FREQUENCY * M_PI * 2;
|
||||
viewang[YAW] += ZOOM_YAW_AMPLITUDE * sin( phase ) * ( spreadfrac + ZOOM_YAW_MIN_AMPLITUDE );
|
||||
*/
|
||||
|
||||
|
||||
VectorCopy(gVR->weaponangles, viewang);
|
||||
viewang[YAW] = ent->client->ps.viewangles[YAW] + (gVR->weaponangles[YAW] - gVR->hmdorientation[YAW]);
|
||||
if (weapon == WP_AKIMBO || weapon == WP_AKIMBO_MP40 || weapon == WP_AKIMBO_THOMPSON) {
|
||||
if (BG_AkimboFireSequence(weapon, ent->client->ps.ammoclip[weapon], ent->client->ps.ammoclip[weapAlts[weapon]], gVR->akimboTriggerState)) {
|
||||
VectorCopy(gVR->offhandweaponangles, viewang);
|
||||
viewang[YAW] = ent->client->ps.viewangles[YAW] + (gVR->offhandweaponangles[YAW] - gVR->hmdorientation[YAW]);
|
||||
} else {
|
||||
VectorCopy(gVR->weaponangles, viewang);
|
||||
viewang[YAW] = ent->client->ps.viewangles[YAW] + (gVR->weaponangles[YAW] - gVR->hmdorientation[YAW]);
|
||||
}
|
||||
} else {
|
||||
VectorCopy(gVR->weaponangles, viewang);
|
||||
viewang[YAW] = ent->client->ps.viewangles[YAW] + (gVR->weaponangles[YAW] - gVR->hmdorientation[YAW]);
|
||||
}
|
||||
|
||||
} else {
|
||||
VectorCopy( ent->client->ps.viewangles, viewang );
|
||||
|
@ -1905,7 +1971,10 @@ void FireWeapon( gentity_t *ent ) {
|
|||
case WP_SILENCER:
|
||||
case WP_COLT:
|
||||
case WP_AKIMBO:
|
||||
aimSpreadScale += 0.4f;
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
// No need for penalty, dual wield penalizes enough :-)
|
||||
// aimSpreadScale += 0.4f;
|
||||
break;
|
||||
|
||||
case WP_PANZERFAUST:
|
||||
|
@ -1945,6 +2014,9 @@ void FireWeapon( gentity_t *ent ) {
|
|||
}
|
||||
|
||||
// fire the specific weapon
|
||||
float spreadReduce = 0;
|
||||
trap_Cvar_VariableValue("vr_spread_reduce", &spreadReduce);
|
||||
float spreadCorrection = 1 - spreadReduce;
|
||||
switch ( ent->s.weapon ) {
|
||||
case WP_KNIFE:
|
||||
Weapon_Knife( ent );
|
||||
|
@ -1956,26 +2028,26 @@ void FireWeapon( gentity_t *ent ) {
|
|||
// jpw
|
||||
break;
|
||||
case WP_LUGER:
|
||||
Bullet_Fire( ent, LUGER_SPREAD * aimSpreadScale, LUGER_DAMAGE );
|
||||
Bullet_Fire( ent, LUGER_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), LUGER_DAMAGE );
|
||||
if (gVR && !( ent->r.svFlags & SVF_CASTAI )) // only recoil the weapon if this is the player
|
||||
gVR->weapon_recoil = WEAPON_RECOIL;
|
||||
break;
|
||||
case WP_SILENCER:
|
||||
Bullet_Fire( ent, SILENCER_SPREAD * aimSpreadScale, LUGER_DAMAGE );
|
||||
Bullet_Fire( ent, SILENCER_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), LUGER_DAMAGE );
|
||||
if (gVR && !( ent->r.svFlags & SVF_CASTAI )) // only recoil the weapon if this is the player
|
||||
gVR->weapon_recoil = WEAPON_RECOIL;
|
||||
break;
|
||||
case WP_AKIMBO: //----(SA) added
|
||||
case WP_COLT:
|
||||
Bullet_Fire( ent, COLT_SPREAD * aimSpreadScale, COLT_DAMAGE );
|
||||
Bullet_Fire( ent, COLT_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), COLT_DAMAGE );
|
||||
if (gVR && !( ent->r.svFlags & SVF_CASTAI )) // only recoil the weapon if this is the player
|
||||
gVR->weapon_recoil = WEAPON_RECOIL;
|
||||
break;
|
||||
case WP_VENOM:
|
||||
weapon_venom_fire( ent, qfalse, aimSpreadScale );
|
||||
weapon_venom_fire( ent, qfalse, aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection) );
|
||||
break;
|
||||
case WP_SNIPERRIFLE:
|
||||
Bullet_Fire( ent, SNIPER_SPREAD * aimSpreadScale, SNIPER_DAMAGE );
|
||||
Bullet_Fire( ent, SNIPER_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), SNIPER_DAMAGE );
|
||||
// JPW NERVE -- added muzzle flip in multiplayer
|
||||
if ( !ent->aiCharacter ) {
|
||||
// if (g_gametype.integer != GT_SINGLE_PLAYER) {
|
||||
|
@ -1989,7 +2061,7 @@ void FireWeapon( gentity_t *ent ) {
|
|||
// jpw
|
||||
break;
|
||||
case WP_SNOOPERSCOPE:
|
||||
Bullet_Fire( ent, SNOOPER_SPREAD * aimSpreadScale, SNOOPER_DAMAGE );
|
||||
Bullet_Fire( ent, SNOOPER_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), SNOOPER_DAMAGE );
|
||||
// JPW NERVE -- added muzzle flip in multiplayer
|
||||
if ( !ent->aiCharacter ) {
|
||||
// if (g_gametype.integer != GT_SINGLE_PLAYER) {
|
||||
|
@ -2002,10 +2074,10 @@ void FireWeapon( gentity_t *ent ) {
|
|||
// jpw
|
||||
break;
|
||||
case WP_MAUSER:
|
||||
Bullet_Fire( ent, MAUSER_SPREAD * aimSpreadScale, MAUSER_DAMAGE );
|
||||
Bullet_Fire( ent, MAUSER_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), MAUSER_DAMAGE );
|
||||
break;
|
||||
case WP_GARAND:
|
||||
Bullet_Fire( ent, GARAND_SPREAD * aimSpreadScale, GARAND_DAMAGE );
|
||||
Bullet_Fire( ent, GARAND_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), GARAND_DAMAGE );
|
||||
break;
|
||||
//----(SA) added
|
||||
case WP_FG42SCOPE:
|
||||
|
@ -2019,17 +2091,19 @@ void FireWeapon( gentity_t *ent ) {
|
|||
SetClientViewAngle( ent,viewang );
|
||||
}
|
||||
case WP_FG42:
|
||||
Bullet_Fire( ent, FG42_SPREAD * aimSpreadScale, FG42_DAMAGE );
|
||||
Bullet_Fire( ent, FG42_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), FG42_DAMAGE );
|
||||
break;
|
||||
//----(SA) end
|
||||
case WP_STEN:
|
||||
Bullet_Fire( ent, STEN_SPREAD * aimSpreadScale, STEN_DAMAGE );
|
||||
Bullet_Fire( ent, STEN_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), STEN_DAMAGE );
|
||||
break;
|
||||
case WP_AKIMBO_MP40:
|
||||
case WP_MP40:
|
||||
Bullet_Fire( ent, MP40_SPREAD * aimSpreadScale, MP40_DAMAGE );
|
||||
Bullet_Fire( ent, MP40_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), MP40_DAMAGE );
|
||||
break;
|
||||
case WP_AKIMBO_THOMPSON:
|
||||
case WP_THOMPSON:
|
||||
Bullet_Fire( ent, THOMPSON_SPREAD * aimSpreadScale, THOMPSON_DAMAGE );
|
||||
Bullet_Fire( ent, THOMPSON_SPREAD * aimSpreadScale * (ent->aiCharacter ? 1 : spreadCorrection), THOMPSON_DAMAGE );
|
||||
break;
|
||||
case WP_PANZERFAUST:
|
||||
ent->client->ps.classWeaponTime = level.time; // JPW NERVE
|
||||
|
|
|
@ -1083,7 +1083,7 @@ typedef enum
|
|||
#define MAX_WEAPS_IN_BANK_MP 8
|
||||
#define MAX_WEAP_BANKS_MP 7
|
||||
// jpw
|
||||
#define MAX_WEAP_ALTS WP_DYNAMITE
|
||||
#define MAX_WEAP_ALTS WP_AKIMBO_THOMPSON
|
||||
|
||||
|
||||
// bit field limits
|
||||
|
@ -1308,9 +1308,9 @@ typedef struct playerState_s {
|
|||
#define WBUTTON_RELOAD 8
|
||||
#define WBUTTON_LEANLEFT 16
|
||||
#define WBUTTON_LEANRIGHT 32
|
||||
#define WBUTTON_ACTIVATE2 64
|
||||
|
||||
// unused
|
||||
#define WBUTTON_EXTRA6 64
|
||||
#define WBUTTON_EXTRA7 128
|
||||
//----(SA) end
|
||||
|
||||
|
|
|
@ -2006,9 +2006,10 @@ void Com_Init( char *commandLine ) {
|
|||
|
||||
Cbuf_AddText( "exec autoexec.cfg\n" );
|
||||
|
||||
//Execute to overwrite additional vr models location with our desired adjustments
|
||||
Cbuf_AddText( "exec models_vr.cfg\n" );
|
||||
//Execute to overwrite weapon locations with our desired adjustments
|
||||
Cbuf_AddText( "exec weapons_vr.cfg\n" );
|
||||
|
||||
//Execute last to allow user adjustment of weapon models if they have something else to use
|
||||
Cbuf_AddText( "exec weapons_user.cfg\n" );
|
||||
|
||||
|
@ -2275,6 +2276,7 @@ Com_Frame
|
|||
=================
|
||||
*/
|
||||
int GetRefresh();
|
||||
int GetRequestedRefresh();
|
||||
void Com_Frame( void ) {
|
||||
|
||||
int msec, minMsec;
|
||||
|
|
|
@ -1020,7 +1020,7 @@ void R_Register( void ) {
|
|||
|
||||
r_ati_fsaa_samples = ri.Cvar_Get( "r_ati_fsaa_samples", "1", CVAR_ARCHIVE ); //DAJ valids are 1, 2, 4
|
||||
|
||||
r_ext_texture_filter_anisotropic = ri.Cvar_Get( "r_ext_texture_filter_anisotropic", "1", CVAR_ARCHIVE );
|
||||
r_ext_texture_filter_anisotropic = ri.Cvar_Get( "r_ext_texture_filter_anisotropic", "4", CVAR_ARCHIVE );
|
||||
|
||||
r_ext_NV_fog_dist = ri.Cvar_Get( "r_ext_NV_fog_dist", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||
r_nv_fogdist_mode = ri.Cvar_Get( "r_nv_fogdist_mode", "GL_EYE_RADIAL_NV", CVAR_ARCHIVE ); // default to 'looking good'
|
||||
|
@ -1091,8 +1091,8 @@ void R_Register( void ) {
|
|||
//
|
||||
// archived variables that can change at any time
|
||||
//
|
||||
r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "250", CVAR_ARCHIVE );
|
||||
r_lodbias = ri.Cvar_Get( "r_lodbias", "-0.6", CVAR_ARCHIVE );
|
||||
r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "350", CVAR_ARCHIVE );
|
||||
r_lodbias = ri.Cvar_Get( "r_lodbias", "-2.4", CVAR_ARCHIVE );
|
||||
r_flares = ri.Cvar_Get( "r_flares", "1", CVAR_ARCHIVE );
|
||||
r_znear = ri.Cvar_Get( "r_znear", "1.0", CVAR_CHEAT );
|
||||
AssertCvarRange( r_znear, 0.001f, 200, qtrue );
|
||||
|
|
|
@ -4375,16 +4375,16 @@ static void UI_Update( const char *name ) {
|
|||
break;
|
||||
}
|
||||
} else if ( Q_stricmp( name, "r_lodbias" ) == 0 ) {
|
||||
switch ( val ) {
|
||||
case 0:
|
||||
float fval = trap_Cvar_VariableValue( name );
|
||||
if (fval <= -2.4) {
|
||||
// high
|
||||
trap_Cvar_SetValue( "r_subdivisions", 4 );
|
||||
break;
|
||||
case 1:
|
||||
trap_Cvar_SetValue( "r_subdivisions", 12 );
|
||||
break;
|
||||
case 2:
|
||||
} else if (fval >= 2.0) {
|
||||
// low
|
||||
trap_Cvar_SetValue( "r_subdivisions", 20 );
|
||||
break;
|
||||
} else {
|
||||
// medium
|
||||
trap_Cvar_SetValue( "r_subdivisions", 12 );
|
||||
}
|
||||
} else if ( Q_stricmp( name, "ui_glCustom" ) == 0 ) {
|
||||
switch ( val ) {
|
||||
|
@ -4490,6 +4490,7 @@ UI_RunMenuScript
|
|||
==============
|
||||
*/
|
||||
|
||||
qboolean showCredits = qtrue;
|
||||
static void UI_RunMenuScript( char **args ) {
|
||||
const char *name, *name2;
|
||||
char buff[1024];
|
||||
|
@ -4569,6 +4570,9 @@ static void UI_RunMenuScript( char **args ) {
|
|||
Controls_SetDefaults();
|
||||
trap_Cvar_Set( "com_introPlayed", "1" );
|
||||
trap_Cvar_Set( "com_recommendedSet", "1" ); // NERVE - SMF
|
||||
trap_Cmd_ExecuteText( EXEC_NOW, "exec models_vr.cfg\n" );
|
||||
trap_Cmd_ExecuteText( EXEC_NOW, "exec weapons_vr.cfg\n" );
|
||||
trap_Cmd_ExecuteText( EXEC_NOW, "exec weapons_user.cfg\n" );
|
||||
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart\n" );
|
||||
// end from MP
|
||||
} else if ( Q_stricmp( name, "getCDKey" ) == 0 ) {
|
||||
|
@ -4775,8 +4779,14 @@ static void UI_RunMenuScript( char **args ) {
|
|||
}
|
||||
//#endif // #ifdef MISSIONPACK
|
||||
} else if ( Q_stricmp( name, "Quit" ) == 0 ) {
|
||||
trap_Cvar_Set( "ui_singlePlayerActive", "0" );
|
||||
trap_Cmd_ExecuteText( EXEC_NOW, "quit" );
|
||||
if (showCredits) {
|
||||
showCredits = qfalse;
|
||||
Menus_CloseAll();
|
||||
Menus_OpenByName( "credits" );
|
||||
} else {
|
||||
trap_Cvar_Set( "ui_singlePlayerActive", "0" );
|
||||
trap_Cmd_ExecuteText( EXEC_NOW, "quit" );
|
||||
}
|
||||
} else if ( Q_stricmp( name, "Controls" ) == 0 ) {
|
||||
trap_Cvar_Set( "cl_paused", "1" );
|
||||
trap_Key_SetCatcher( KEYCATCH_UI );
|
||||
|
@ -6782,20 +6792,22 @@ void _UI_MouseEvent( int dx, int dy ) {
|
|||
UI_MouseEvent
|
||||
=================
|
||||
*/
|
||||
const int cursorSize = 16;
|
||||
void _UI_MouseEventAbs( int x, int y ) {
|
||||
// update mouse screen position
|
||||
// allow to hide cursor beyond the screen edges
|
||||
uiInfo.uiDC.cursorx = x;
|
||||
if ( uiInfo.uiDC.cursorx < 0 ) {
|
||||
uiInfo.uiDC.cursorx = 0;
|
||||
} else if ( uiInfo.uiDC.cursorx > SCREEN_WIDTH ) {
|
||||
uiInfo.uiDC.cursorx = SCREEN_WIDTH;
|
||||
if ( uiInfo.uiDC.cursorx < -cursorSize ) {
|
||||
uiInfo.uiDC.cursorx = -cursorSize;
|
||||
} else if ( uiInfo.uiDC.cursorx > SCREEN_WIDTH + cursorSize ) {
|
||||
uiInfo.uiDC.cursorx = SCREEN_WIDTH + cursorSize;
|
||||
}
|
||||
|
||||
uiInfo.uiDC.cursory = y;
|
||||
if ( uiInfo.uiDC.cursory < 0 ) {
|
||||
uiInfo.uiDC.cursory = 0;
|
||||
} else if ( uiInfo.uiDC.cursory > SCREEN_HEIGHT ) {
|
||||
uiInfo.uiDC.cursory = SCREEN_HEIGHT;
|
||||
if ( uiInfo.uiDC.cursory < -cursorSize ) {
|
||||
uiInfo.uiDC.cursory = -cursorSize;
|
||||
} else if ( uiInfo.uiDC.cursory > SCREEN_HEIGHT + cursorSize) {
|
||||
uiInfo.uiDC.cursory = SCREEN_HEIGHT + cursorSize;
|
||||
}
|
||||
|
||||
if ( Menu_Count() > 0 ) {
|
||||
|
|
|
@ -1674,6 +1674,10 @@ qboolean Item_SetFocus( itemDef_t *item, float x, float y ) {
|
|||
|
||||
if ( playSound && sfx ) {
|
||||
DC->startLocalSound( *sfx, CHAN_LOCAL_SOUND );
|
||||
// Ugly hack for haptics but i didn't manage to make
|
||||
// vr_client_info_t structure and vibrate function
|
||||
// accessible here :-(
|
||||
DC->setCVar("vr_menu_item_touched", "1");
|
||||
}
|
||||
|
||||
for ( i = 0; i < parent->itemCount; i++ ) {
|
||||
|
|
BIN
Projects/Android/z_vr_assets/gfx/menus/background_dim.tga
Normal file
BIN
Projects/Android/z_vr_assets/gfx/menus/control_scheme.tga
Normal file
BIN
Projects/Android/z_vr_assets/gfx/vignette.tga
Normal file
BIN
Projects/Android/z_vr_assets/icons/arrow.tga
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
Projects/Android/z_vr_assets/icons/binoculars.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/binoculars_select.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/exit.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/exit_select.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/icon_pbook_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/icon_vbook_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/icon_zbook_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_acolt_1.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_acolt_1_select.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_amp40_1.tga
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_amp40_1_select.tga
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_athompson_1.tga
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_athompson_1_select.tga
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_sluger_1.tga
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Projects/Android/z_vr_assets/icons/iconw_sluger_1_select.tga
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
Projects/Android/z_vr_assets/icons/item_select_cursor.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/load.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/load_select.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/noammo2.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/save.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/save_select.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
Projects/Android/z_vr_assets/icons/stamina_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/wine2_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/wine3_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/icons/wine_notselect.tga
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Projects/Android/z_vr_assets/models/players/bj/hand.mdc
Normal file
BIN
Projects/Android/z_vr_assets/models/powerups/binoc.jpg
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
Projects/Android/z_vr_assets/models/powerups/v_binocs.mdc
Normal file
5
Projects/Android/z_vr_assets/models_vr.cfg
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Offes for other VR models
|
||||
// Values are: scale,right,up,forward,pitch,yaw,roll
|
||||
|
||||
seta vr_offhand_adjustment "1,-1,-1,-1,0,0,0"
|
||||
seta vr_binoculars_adjustment "0.7,0,0,0,0,65,0"
|
71
Projects/Android/z_vr_assets/text/pickupnames.txt
Normal file
|
@ -0,0 +1,71 @@
|
|||
"---"
|
||||
"---"
|
||||
"Treasure Item"
|
||||
"Small Health"
|
||||
"Med Health"
|
||||
"Large Health"
|
||||
"Hot Meal"
|
||||
"Cold Meal"
|
||||
"---"
|
||||
"Health" // hanging kit
|
||||
"Stamina" // stein
|
||||
"Stamina" // brandy
|
||||
"Flak Jacket"
|
||||
"Flak Jacket" // hanging on hook
|
||||
"Armored Helmet"
|
||||
"---"
|
||||
"Knife"
|
||||
"Luger"
|
||||
"Mauser Rifle"
|
||||
"Dual Thompsons"
|
||||
"Thompson"
|
||||
"Sten"
|
||||
"Dual Colts"
|
||||
"Colt"
|
||||
"---"
|
||||
"Dual MP40s"
|
||||
"MP40"
|
||||
"FG42 Paratroop Rifle"
|
||||
"Silencer"
|
||||
"Panzerfaust"
|
||||
"Grenade"
|
||||
"Pineapple"
|
||||
"---"
|
||||
"Venom"
|
||||
"Flamethrower"
|
||||
"Tesla Gun"
|
||||
"Sniper Scope"
|
||||
"Snooper Rifle"
|
||||
"---"
|
||||
"---"
|
||||
"---"
|
||||
"---"
|
||||
"---"
|
||||
"9mm Rounds"
|
||||
"9mm"
|
||||
"9mm Box"
|
||||
".45cal Rounds"
|
||||
".45cal"
|
||||
".45cal Box"
|
||||
"7.92mm Rounds"
|
||||
"7.92mm"
|
||||
"7.92mm Box"
|
||||
".30cal Rounds"
|
||||
".30cal"
|
||||
".30cal Box"
|
||||
"12.7mm"
|
||||
"Grenades"
|
||||
"Pineapples"
|
||||
"Dynamite"
|
||||
"Cell"
|
||||
"Fuel"
|
||||
"Rockets"
|
||||
"---"
|
||||
"1938 Latour"
|
||||
"Endurance"
|
||||
"Venom Tech Manual"
|
||||
"Project Book"
|
||||
"Dr. Zemph's Journal"
|
||||
"Red Flag"
|
||||
"Blue Flag"
|
||||
"Binoculars"
|
BIN
Projects/Android/z_vr_assets/ui/assets/cheats_sketch.tga
Normal file
After Width: | Height: | Size: 256 KiB |
BIN
Projects/Android/z_vr_assets/ui/assets/pageturn3.tga
Normal file
After Width: | Height: | Size: 16 KiB |
149
Projects/Android/z_vr_assets/ui/cheats.menu
Normal file
|
@ -0,0 +1,149 @@
|
|||
#include "ui/menudef.h"
|
||||
{
|
||||
|
||||
menuDef {
|
||||
name "cheats"
|
||||
visible 0
|
||||
fullscreen 0
|
||||
rect 0 0 640 480
|
||||
focusColor 1 .75 0 1
|
||||
style 1
|
||||
border 1
|
||||
onOpen { play "sound/notebook/book_open.wav" }
|
||||
onESC { play "sound/notebook/book_close.wav" }
|
||||
|
||||
itemDef {
|
||||
name background
|
||||
rect 20 30 600 420 // centered
|
||||
style WINDOW_STYLE_SHADER
|
||||
background "notebook1"
|
||||
forecolor 0 0 0 1
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name button_close
|
||||
text "Close"
|
||||
type 1
|
||||
textscale .25
|
||||
group grpControlbutton
|
||||
type ITEM_TYPE_BUTTON
|
||||
style WINDOW_STYLE_SHADER
|
||||
background "ui/assets/bookmark_back.tga"
|
||||
rect 400 436 64 34
|
||||
textalign 1
|
||||
textalignx 32
|
||||
textaligny 30
|
||||
forecolor 1 1 1 .7
|
||||
backcolor .3 .3 .3 1
|
||||
visible 1
|
||||
action { close cheats; open notebook }
|
||||
mouseEnter { setitemcolor button_close backcolor .1 .37 .1 1 }
|
||||
mouseExit { setitemcolor button_close backcolor .37 .1 .1 1 }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name sketch
|
||||
group page
|
||||
style WINDOW_STYLE_SHADER
|
||||
background "ui/assets/cheats_sketch.tga"
|
||||
rect 340 110 256 256
|
||||
textalign 1
|
||||
textalignx 32
|
||||
textaligny 30
|
||||
forecolor 1 1 1 .7
|
||||
backcolor .3 .3 .3 1
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name title
|
||||
group page
|
||||
rect 64 72 240 30
|
||||
text "PRIVATE BUCKET LIST:"
|
||||
textfont UI_FONT_HANDWRITING
|
||||
textscale .3
|
||||
forecolor .1 .1 .1 .75
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name heal
|
||||
group page
|
||||
rect 64 105 200 20
|
||||
type ITEM_TYPE_BUTTON
|
||||
style WINDOW_STYLE_EMPTY
|
||||
text "> Heal all wounds"
|
||||
textfont UI_FONT_HANDWRITING
|
||||
textscale .3
|
||||
textaligny 15
|
||||
forecolor .1 .1 .1 .75
|
||||
visible 1
|
||||
action { play "sound/notebook/book_pageflip.wav"; exec "give health 100;" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name armor
|
||||
group page
|
||||
rect 64 135 240 20
|
||||
type ITEM_TYPE_BUTTON
|
||||
style WINDOW_STYLE_EMPTY
|
||||
text "> Patch the armor"
|
||||
textfont UI_FONT_HANDWRITING
|
||||
textscale .3
|
||||
textaligny 15
|
||||
forecolor .1 .1 .1 .75
|
||||
visible 1
|
||||
action { play "sound/notebook/book_pageflip.wav"; exec "give armor 100;" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ammo
|
||||
group page
|
||||
rect 64 165 240 20
|
||||
type ITEM_TYPE_BUTTON
|
||||
style WINDOW_STYLE_EMPTY
|
||||
text "> Scavenge some ammo"
|
||||
textfont UI_FONT_HANDWRITING
|
||||
textscale .3
|
||||
textaligny 15
|
||||
forecolor .1 .1 .1 .75
|
||||
visible 1
|
||||
action { play "sound/notebook/book_pageflip.wav"; exec "give ammo;" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ammo
|
||||
group page
|
||||
rect 64 195 240 20
|
||||
type ITEM_TYPE_BUTTON
|
||||
style WINDOW_STYLE_EMPTY
|
||||
text "> Get armed to the teeth"
|
||||
textfont UI_FONT_HANDWRITING
|
||||
textscale .3
|
||||
textaligny 15
|
||||
forecolor .1 .1 .1 .75
|
||||
visible 1
|
||||
action { play "sound/notebook/book_pageflip.wav"; exec "give all;" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ammo
|
||||
group page
|
||||
rect 64 225 240 20
|
||||
type ITEM_TYPE_BUTTON
|
||||
style WINDOW_STYLE_EMPTY
|
||||
text "> Just feel like running"
|
||||
textfont UI_FONT_HANDWRITING
|
||||
textscale .3
|
||||
textaligny 15
|
||||
forecolor .1 .1 .1 .75
|
||||
visible 1
|
||||
action { play "sound/notebook/book_pageflip.wav"; exec "nofatigue;" }
|
||||
}
|
||||
|
||||
} // end menudef
|
||||
} // end all
|
|
@ -94,12 +94,12 @@ menuDef
|
|||
itemDef
|
||||
{
|
||||
name ctr_vr
|
||||
text "VR Controls"
|
||||
text "General"
|
||||
type 1
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 172 10 100 12
|
||||
rect 86 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -112,14 +112,13 @@ itemDef
|
|||
mouseExit { hide message_graphics ; setitemcolor ctr_vr backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
text "Control Scheme: "
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_control_scheme"
|
||||
cvarFloatList {"Right Handed" 0 "Left Handed" 10 }
|
||||
text "Direction Mode: "
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_walkdirection"
|
||||
cvarFloatList {"Off-hand Controller" 0 "HMD" 1 }
|
||||
rect 82 30 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
|
@ -128,51 +127,51 @@ itemDef
|
|||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
text "Switch Thumbsticks: "
|
||||
type ITEM_TYPE_YESNO
|
||||
cvar "vr_switch_sticks"
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
text "Teleport: "
|
||||
type ITEM_TYPE_YESNO
|
||||
cvar "vr_teleport"
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Laser Sight: "
|
||||
cvar "vr_lasersight"
|
||||
text "Turning Mode:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_turn_mode"
|
||||
cvarFloatList {"Snap Turn" 0 "Smooth Turn" 1 }
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Turn Angle:"
|
||||
cvarfloat "vr_turn_angle" .0 1 90
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
text "Control Scheme: "
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_control_scheme"
|
||||
cvarFloatList {"Right Handed" 0 "Left Handed" 10 }
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
|
@ -184,69 +183,30 @@ itemDef
|
|||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Height Adjust:"
|
||||
cvarfloat "cg_heightAdjust" .0 .01 1
|
||||
text "Switch Thumbsticks: "
|
||||
type ITEM_TYPE_YESNO
|
||||
cvar "vr_switch_sticks"
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
text "Turning Mode:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_turn_mode"
|
||||
cvarFloatList {"Snap Turn" 0 "Smooth Turn" 1 }
|
||||
rect 82 105 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Turn Angle:"
|
||||
cvarfloat "vr_turn_angle" .0 1 90
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
text "Teleport: "
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Gaze Movement Direction: "
|
||||
cvar "vr_walkdirection"
|
||||
rect 82 135 290 12
|
||||
cvar "vr_teleport"
|
||||
rect 82 105 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -263,6 +223,23 @@ itemDef
|
|||
type ITEM_TYPE_SLIDER
|
||||
text "Movement Speed:"
|
||||
cvarfloat "vr_movement_multiplier" .0 0.05 1.0
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "IRL Crouch:"
|
||||
cvar "vr_irl_crouch_enabled"
|
||||
rect 82 150 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
|
@ -274,6 +251,40 @@ itemDef
|
|||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Gesture Triggered Use: "
|
||||
cvar "vr_gesture_triggered_use"
|
||||
rect 82 165 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Use Gesture Boundary:"
|
||||
cvarfloat "vr_use_gesture_boundary" 0 0.20 0.50
|
||||
rect 82 180 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
|
@ -281,7 +292,7 @@ itemDef
|
|||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_virtual_stock"
|
||||
cvarFloatList {"Off" 0 "Classic" 1 }
|
||||
rect 82 165 290 12
|
||||
rect 82 210 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -296,9 +307,26 @@ itemDef
|
|||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Screen Distance:"
|
||||
cvarfloat "vr_screen_dist" 2.0 0.5 8.0
|
||||
rect 82 180 290 12
|
||||
text "Weapon Pitch:"
|
||||
cvarfloat "vr_weapon_pitchadjust" 0 -25 5
|
||||
rect 82 225 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Weapon Spread Reduce:"
|
||||
cvarfloat "vr_spread_reduce" 0 0 1
|
||||
rect 82 240 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -310,14 +338,37 @@ itemDef
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name ctr_comfort
|
||||
text "Comfort"
|
||||
type 1
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 186 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
forecolor 1 1 1 1
|
||||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
hide grpControls ; show comfort }
|
||||
mouseEnter { show message_graphics ; setitemcolor ctr_comfort backcolor .3 .3 .3 0 }
|
||||
mouseExit { hide message_graphics ; setitemcolor ctr_comfort backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name vr
|
||||
name comfort
|
||||
group grpControls
|
||||
text "Cinematic:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_cinematic_stereo"
|
||||
cvarFloatList {"2D" 0 "3D" 1 }
|
||||
rect 82 195 290 12
|
||||
rect 82 30 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -327,7 +378,94 @@ itemDef
|
|||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Screen Distance:"
|
||||
cvarfloat "vr_screen_dist" 2.0 0.5 8.0
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Height Adjust:"
|
||||
cvarfloat "cg_heightAdjust" .0 .01 1
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Haptic Intensity:"
|
||||
cvarfloat "vr_haptic_intensity" 0 0 1
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Comfort Vignette:"
|
||||
cvarfloat "vr_comfort_vignette" 0 0 1
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ctr_help
|
||||
text "Help"
|
||||
type 1
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 286 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
forecolor 1 1 1 1
|
||||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
hide grpControls ; hide comfort ; open helpPopupMenu }
|
||||
mouseEnter { show message_graphics ; setitemcolor ctr_help backcolor .3 .3 .3 0 }
|
||||
mouseExit { hide message_graphics ; setitemcolor ctr_help backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
// TOOLS MESSAGE //
|
||||
|
258
Projects/Android/z_vr_assets/ui/credits.menu
Normal file
|
@ -0,0 +1,258 @@
|
|||
#include "ui/menudef.h"
|
||||
{
|
||||
|
||||
menuDef {
|
||||
name "credits"
|
||||
fullScreen 1
|
||||
rect 0 0 640 480
|
||||
visible 1
|
||||
focusColor 1 1 1 1
|
||||
style 0
|
||||
onESC { uiScript Quit }
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
style WINDOW_STYLE_SHADER
|
||||
rect 0 0 640 480
|
||||
background "gfx/2d/backtile"
|
||||
forecolor 0 0 0 1
|
||||
backcolor 0 0 0 1
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 15 640 40
|
||||
text "RTCWQuest by Team Beef"
|
||||
forecolor 1 0 0 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 35 640 40
|
||||
text "===================="
|
||||
forecolor 1 1 1 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 70 640 40
|
||||
text "Team Beef are DrBeef, Baggyg, Bummser"
|
||||
forecolor 0 0 1 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 120 640 40
|
||||
text "Lead programmer"
|
||||
forecolor 1 0 0 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 140 640 40
|
||||
text "DrBeef"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 170 640 40
|
||||
text "Additional Development Contributions"
|
||||
forecolor 1 0 0 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 190 640 40
|
||||
text "Baggyg, Eigenlaut, MuadDib"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 220 640 40
|
||||
text "VR Compatible Weapon Models"
|
||||
forecolor 1 0 0 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 240 640 40
|
||||
text "Dark Matter Productions and William Faure"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 260 640 40
|
||||
text "LennyGuy20"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 310 640 40
|
||||
text "With Special Thanks to:"
|
||||
forecolor 1 0 0 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 340 640 40
|
||||
text "Emile Belanger for providing the android port upon which this is based,"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 360 640 40
|
||||
text "HellBaron for allowing us to provide a custom version of his excellent Venom Mod,"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 380 640 40
|
||||
text "ptitSeb for the OpenGL => OpenGLES2 translation making this project possible,"
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 400 640 40
|
||||
text "Team Beef patrons and all Team Beef discord members for supporting us."
|
||||
forecolor 1 1 1 1
|
||||
textscale .3
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
type ITEM_TYPE_TEXT
|
||||
rect 0 455 640 40
|
||||
text "Join our Patreon: patreon.com/teambeef"
|
||||
forecolor 1 0 0 1
|
||||
textscale .4
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 320
|
||||
textaligny 10
|
||||
visible 1
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name none
|
||||
style WINDOW_STYLE_EMPTY
|
||||
type ITEM_TYPE_BUTTON
|
||||
rect 0 0 640 480
|
||||
visible 1
|
||||
action { uiScript Quit }
|
||||
}
|
||||
|
||||
} // end menudef
|
||||
} // end all
|
41
Projects/Android/z_vr_assets/ui/help_popup.menu
Normal file
|
@ -0,0 +1,41 @@
|
|||
#include "ui/menudef.h"
|
||||
|
||||
{
|
||||
menuDef
|
||||
{
|
||||
name helpPopupMenu
|
||||
visible 0
|
||||
fullScreen 0
|
||||
rect 0 0 640 480
|
||||
focusColor 1 1 1 1
|
||||
style WINDOW_STYLE_FILLED
|
||||
outOfBoundsClick
|
||||
popup
|
||||
onEsc { open foo }
|
||||
|
||||
itemDef
|
||||
{
|
||||
group none
|
||||
name background
|
||||
rect 0 0 640 480
|
||||
style WINDOW_STYLE_SHADER
|
||||
type ITEM_TYPE_BUTTON
|
||||
background "gfx/menus/background_dim.tga"
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
action { open foo }
|
||||
}
|
||||
|
||||
itemDef
|
||||
{
|
||||
group none
|
||||
name scheme
|
||||
rect 20 15 600 450
|
||||
style WINDOW_STYLE_SHADER
|
||||
background "gfx/menus/control_scheme.tga"
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
}
|
||||
}
|
32
Projects/Android/z_vr_assets/ui/ingame.txt
Normal file
|
@ -0,0 +1,32 @@
|
|||
// menu defs
|
||||
//
|
||||
{
|
||||
loadMenu { "ui/ingame.menu" }
|
||||
// loadMenu { "ui/ingame_about.menu" }
|
||||
loadMenu { "ui/ingame_controls.menu" }
|
||||
loadMenu { "ui/ingame_options.menu" }
|
||||
loadMenu { "ui/ingame_system.menu" }
|
||||
loadMenu { "ui/ingame_leave.menu" }
|
||||
loadMenu { "ui/ingame_player.menu" }
|
||||
|
||||
loadMenu { "ui/ingame_load.menu" }
|
||||
loadMenu { "ui/ingame_save.menu" }
|
||||
|
||||
loadMenu { "ui/in_vid_restart.menu" }
|
||||
loadMenu { "ui/in_snd_restart.menu" }
|
||||
loadMenu { "ui/in_rec_restart.menu" }
|
||||
|
||||
loadMenu { "ui/notebook.menu" }
|
||||
loadMenu { "ui/clipboard.menu" }
|
||||
loadMenu { "ui/bookz.menu" }
|
||||
loadMenu { "ui/bookv.menu" }
|
||||
loadMenu { "ui/bookp.menu" }
|
||||
loadMenu { "ui/pregame.menu" }
|
||||
loadMenu { "ui/test.menu" }
|
||||
|
||||
loadMenu { "ui/ingame_help.menu" }
|
||||
loadMenu { "ui/cheats.menu" }
|
||||
|
||||
loadMenu { "ui/credits.menu" }
|
||||
loadMenu { "ui/help_popup.menu"}
|
||||
}
|
|
@ -68,12 +68,12 @@ itemDef {
|
|||
itemDef
|
||||
{
|
||||
name ctr_vr
|
||||
text "VR Controls"
|
||||
text "General"
|
||||
type 1
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 172 10 100 12
|
||||
rect 86 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -81,11 +81,63 @@ itemDef
|
|||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
hide grpControls ; show vr }
|
||||
hide grpControls ; show ingame_vr }
|
||||
mouseEnter { show message_graphics ; setitemcolor ctr_vr backcolor .3 .3 .3 0 }
|
||||
mouseExit { hide message_graphics ; setitemcolor ctr_vr backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
text "Direction Mode: "
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_walkdirection"
|
||||
cvarFloatList {"Off-hand Controller" 0 "HMD" 1 }
|
||||
rect 82 30 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
text "Turning Mode:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_turn_mode"
|
||||
cvarFloatList {"Snap Turn" 0 "Smooth Turn" 1 }
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Turn Angle:"
|
||||
cvarfloat "vr_turn_angle" .0 1 90
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
|
@ -94,7 +146,7 @@ itemDef
|
|||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_control_scheme"
|
||||
cvarFloatList {"Right Handed" 0 "Left Handed" 10 }
|
||||
rect 82 30 290 12
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -105,14 +157,13 @@ itemDef
|
|||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
text "Switch Thumbsticks: "
|
||||
type ITEM_TYPE_YESNO
|
||||
cvar "vr_switch_sticks"
|
||||
rect 82 45 290 12
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -129,97 +180,7 @@ itemDef
|
|||
text "Teleport: "
|
||||
type ITEM_TYPE_YESNO
|
||||
cvar "vr_teleport"
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Laser Sight: "
|
||||
cvar "vr_lasersight"
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Height Adjust:"
|
||||
cvarfloat "cg_heightAdjust" .0 .01 1
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
text "Turning Mode:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_turn_mode"
|
||||
cvarFloatList {"Snap Turn" 0 "Smooth Turn" 1 }
|
||||
rect 82 105 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Turn Angle:"
|
||||
cvarfloat "vr_turn_angle" .0 1 90
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Gaze Movement Direction: "
|
||||
cvar "vr_walkdirection"
|
||||
rect 82 135 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -236,6 +197,23 @@ itemDef
|
|||
type ITEM_TYPE_SLIDER
|
||||
text "Movement Speed:"
|
||||
cvarfloat "vr_movement_multiplier" .0 0.05 1.0
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "IRL Crouch:"
|
||||
cvar "vr_irl_crouch_enabled"
|
||||
rect 82 150 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
|
@ -247,6 +225,40 @@ itemDef
|
|||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Gesture Triggered Use: "
|
||||
cvar "vr_gesture_triggered_use"
|
||||
rect 82 165 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Use Gesture Boundary:"
|
||||
cvarfloat "vr_use_gesture_boundary" 0 0.20 0.50
|
||||
rect 82 180 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
|
@ -254,7 +266,7 @@ itemDef
|
|||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_virtual_stock"
|
||||
cvarFloatList {"Off" 0 "Classic" 1 }
|
||||
rect 82 165 290 12
|
||||
rect 82 210 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -269,9 +281,26 @@ itemDef
|
|||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Screen Distance:"
|
||||
cvarfloat "vr_screen_dist" 2.0 0.5 8.0
|
||||
rect 82 180 290 12
|
||||
text "Weapon Pitch:"
|
||||
cvarfloat "vr_weapon_pitchadjust" 0 -25 5
|
||||
rect 82 225 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Weapon Spread Reduce:"
|
||||
cvarfloat "vr_spread_reduce" 0 0 1
|
||||
rect 82 240 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -283,14 +312,37 @@ itemDef
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name ctr_comfort
|
||||
text "Comfort"
|
||||
type 1
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 186 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
forecolor 1 1 1 1
|
||||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
hide grpControls ; show comfort }
|
||||
mouseEnter { show message_graphics ; setitemcolor ctr_comfort backcolor .3 .3 .3 0 }
|
||||
mouseExit { hide message_graphics ; setitemcolor ctr_comfort backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name ingame_vr
|
||||
name comfort
|
||||
group grpControls
|
||||
text "Cinematic:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "vr_cinematic_stereo"
|
||||
cvarFloatList {"2D" 0 "3D" 1 }
|
||||
rect 82 195 290 12
|
||||
rect 82 30 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -300,7 +352,95 @@ itemDef
|
|||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Screen Distance:"
|
||||
cvarfloat "vr_screen_dist" 2.0 0.5 8.0
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Height Adjust:"
|
||||
cvarfloat "cg_heightAdjust" .0 .01 1
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Haptic Intensity:"
|
||||
cvarfloat "vr_haptic_intensity" 0 0 1
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name comfort
|
||||
group grpControls
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Comfort Vignette:"
|
||||
cvarfloat "vr_comfort_vignette" 0 0 1
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name ctr_help
|
||||
text "Help"
|
||||
type 1
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 286 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
forecolor 1 1 1 1
|
||||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
hide grpControls ; hide comfort ; open helpPopupMenu }
|
||||
mouseEnter { show message_graphics ; setitemcolor ctr_help backcolor .3 .3 .3 0 }
|
||||
mouseExit { hide message_graphics ; setitemcolor ctr_help backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
|
@ -13,7 +13,7 @@ menuDef {
|
|||
style 1
|
||||
border 1
|
||||
|
||||
onopen { hide grpOptions ; show performance }
|
||||
onopen { hide grpOptions ; show view }
|
||||
|
||||
|
||||
|
||||
|
@ -56,8 +56,7 @@ itemDef {
|
|||
type 1
|
||||
textscale .23
|
||||
group grpControlbutton
|
||||
// rect 50 10 100 12
|
||||
rect 92 10 100 12
|
||||
rect 256 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -183,7 +182,7 @@ itemDef {
|
|||
text "Corona Dist:"
|
||||
cvar "cg_coronafardist"
|
||||
cvarFloatList { "normal" 1536 "far" 4096 "you crazy" 16000 "off" 0 "near" 800 }
|
||||
rect 82 120 290 12
|
||||
rect 82 105 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -194,8 +193,22 @@ itemDef {
|
|||
visible 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name performance
|
||||
group grpOptions
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Particles: "
|
||||
cvar "cg_wolfparticles"
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name performance
|
||||
|
@ -216,41 +229,6 @@ itemDef {
|
|||
}
|
||||
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
// extension specific stuff
|
||||
//
|
||||
//////////////////////
|
||||
|
||||
itemDef {
|
||||
name performance
|
||||
group grpOptions
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Nvidia fog type:"
|
||||
|
||||
cvarTest "r_ext_NV_fog_dist"
|
||||
showcvar { "1" }
|
||||
cvar "r_nv_fogdist_mode"
|
||||
cvarStrList { "NV Radial", "GL_EYE_RADIAL_NV", "NV Plane", "GL_EYE_PLANE_ABSOLUTE_NV" }
|
||||
|
||||
rect 82 150 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
// end extension specific stuff
|
||||
//
|
||||
//////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////
|
||||
|
@ -263,7 +241,7 @@ itemDef {
|
|||
type 1
|
||||
textscale .23
|
||||
group grpControlbutton
|
||||
rect 270 10 100 12
|
||||
rect 106 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -294,8 +272,22 @@ itemDef {
|
|||
visible 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
group grpOptions
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Draw HUD: "
|
||||
cvar "vr_draw_hud"
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
|
@ -303,7 +295,7 @@ itemDef {
|
|||
type ITEM_TYPE_SLIDER
|
||||
text "HUD Alpha:"
|
||||
cvarfloat "cg_hudAlpha" .6 .1 1
|
||||
rect 82 85 290 12
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -314,28 +306,36 @@ itemDef {
|
|||
visible 0
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
group grpOptions
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Laser Sight: "
|
||||
cvar "vr_lasersight"
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
// this \/ is actually lower than the crosshair stuff physically,
|
||||
// but up here for reference to other sliders
|
||||
|
||||
itemDef {
|
||||
|
||||
// only show this in this menu if "r_ignorehwgamma" is not set. if it's set, it will require a
|
||||
// vid_restart, so the option shows in the system->graphics location
|
||||
|
||||
cvarTest "r_ignorehwgamma"
|
||||
showcvar { "0" }
|
||||
|
||||
name view
|
||||
group grpOptions
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Brightness:"
|
||||
cvarfloat "r_gamma" 1 0.5 3
|
||||
rect 82 125 290 12
|
||||
// rect 72 220 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
|
@ -343,36 +343,6 @@ itemDef {
|
|||
visible 0
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
group grpOptions
|
||||
text "Crosshair:"
|
||||
type 1
|
||||
rect 190 210 60 12
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textscale .23
|
||||
textalignx 30
|
||||
textaligny 12
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
decoration
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
group grpOptions
|
||||
rect 194 150 50 50
|
||||
ownerdraw UI_CROSSHAIR
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 0
|
||||
textaligny 50
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ itemDef {
|
|||
textscale .23
|
||||
group grpControlbutton
|
||||
background "ui/assets/button_back.tga"
|
||||
rect 56 10 100 12
|
||||
rect 106 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -70,92 +70,23 @@ itemDef {
|
|||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
text "Set Recommended"
|
||||
type 1
|
||||
textscale .25
|
||||
group grpsystem
|
||||
style WINDOW_STYLE_FILLED
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Refresh Rate:"
|
||||
cvar "vr_refresh"
|
||||
cvarFloatList { "72 (recommended)" 72 "80" 80 "90" 90 "120" 120 }
|
||||
rect 82 30 290 12
|
||||
textalign 1
|
||||
textalignx 145
|
||||
textaligny 12
|
||||
forecolor 1 1 1 1
|
||||
backcolor 1 1 1 .07
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Quality:"
|
||||
cvar "ui_glCustom"
|
||||
cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 }
|
||||
|
||||
cvarTest "ui_glCustom"
|
||||
hideCvar { "999" } // 999 is 'recommended'
|
||||
|
||||
rect 82 55 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action {
|
||||
uiScript update "ui_glCustom" }
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
text "Quality: Recommended"
|
||||
type ITEM_TYPE_BUTTON
|
||||
|
||||
cvarTest "ui_glCustom"
|
||||
showCvar { "999" } // 999 is 'recommended'
|
||||
|
||||
rect 82 55 290 12
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 162
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action {
|
||||
setcvar ui_glCustom 0; // 'recommended'
|
||||
uiScript update "ui_glCustom" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
text "GL Extensions:"
|
||||
cvar "r_allowExtensions"
|
||||
rect 82 70 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
|
@ -163,7 +94,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
text "Anisotropic Filter Level:"
|
||||
cvar "r_ext_texture_filter_anisotropic"
|
||||
cvarFloatList { "1" 1 "2" 2 "4" 4 "8" 8 "16" 16 }
|
||||
rect 82 85 290 12
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -175,25 +106,6 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Color Depth:"
|
||||
cvar "r_colorbits"
|
||||
cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
|
||||
rect 82 100 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom ; uiScript update "r_colorbits" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
|
@ -201,7 +113,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
text "Lighting:"
|
||||
cvar "r_vertexlight"
|
||||
cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 }
|
||||
rect 82 130 290 12
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -219,8 +131,8 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
type ITEM_TYPE_MULTI
|
||||
text "Geometric Detail:"
|
||||
cvar "r_lodbias"
|
||||
cvarFloatList { "High" 0 "Medium" 1 "Low" 2 }
|
||||
rect 82 145 290 12
|
||||
cvarFloatList { "High" -2.4 "Medium" -0.6 "Low" 2 }
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -239,7 +151,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
text "General Textures:"
|
||||
cvar "r_picmip"
|
||||
cvarFloatList { "Low" 2 "Normal" 1 "High" 0 }
|
||||
rect 82 160 290 12
|
||||
rect 82 105 290 12
|
||||
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
|
@ -259,7 +171,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
text "Character Textures:"
|
||||
cvar "r_picmip2"
|
||||
cvarFloatList { "Low" 3 "Normal" 2 "High" 1 "Extra" 0 }
|
||||
rect 82 175 290 12
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -270,8 +182,6 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
|
@ -280,7 +190,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
text "Texture Filter:"
|
||||
cvar "r_textureMode"
|
||||
cvarStrList { "No filter", "GL_NEAREST", "Bilinear (no mipmap)", "GL_LINEAR", "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" }
|
||||
rect 82 190 290 12
|
||||
rect 82 135 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -292,18 +202,13 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Compress Textures:"
|
||||
cvar "r_ext_compressed_textures"
|
||||
rect 82 205 290 12
|
||||
rect 82 150 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -314,26 +219,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Texture Quality:"
|
||||
cvar "r_texturebits"
|
||||
cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
|
||||
rect 82 220 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
cvarTest "r_ignorehwgamma"
|
||||
showcvar { "1" }
|
||||
|
@ -343,7 +229,7 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
type ITEM_TYPE_SLIDER
|
||||
text "Brightness:"
|
||||
cvarfloat "r_gamma" 1 0.5 3
|
||||
rect 82 235 290 12
|
||||
rect 82 165 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -355,62 +241,6 @@ open in_rec_restart_popmenu ; hide graphics ; hide graphicsapply}
|
|||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
//
|
||||
// Nvidia
|
||||
//
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
|
||||
text "Nvidia Distance Fog:"
|
||||
cvar "r_ext_NV_fog_dist"
|
||||
|
||||
// would be nice to be able to do an extension check from the menu
|
||||
// extensionTest "GL_NV_fog_distance"
|
||||
|
||||
rect 82 250 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
//
|
||||
// ATI
|
||||
//
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
|
||||
text "Trueform:"
|
||||
cvar "r_ext_ATI_pntriangles"
|
||||
|
||||
// would be nice to be able to do an extension check from the menu
|
||||
// extensionTest "GL_ATIX_pn_triangles"
|
||||
|
||||
rect 82 265 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
//cvar_t *r_ext_ATI_pntriangles;
|
||||
//cvar_t *r_ati_truform_tess;
|
||||
//cvar_t *r_ati_truform_mode;
|
||||
|
||||
|
||||
itemDef {
|
||||
|
@ -436,26 +266,7 @@ open in_vid_restart_popmenu ; hide graphics ; hide graphicsapply }
|
|||
|
||||
}
|
||||
|
||||
|
||||
//here
|
||||
|
||||
itemDef {
|
||||
name ctr_driver
|
||||
text "Driver Info"
|
||||
type 1
|
||||
textscale .23
|
||||
group grpControlbutton
|
||||
rect 181 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
forecolor 1 1 1 1
|
||||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { hide grpSystem ; show driver }
|
||||
mouseEnter { setitemcolor ctr_driver backcolor .1 .37 .1 1 }
|
||||
mouseExit { setitemcolor ctr_driver backcolor .37 .1 .1 1 }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -476,7 +287,7 @@ open in_vid_restart_popmenu ; hide graphics ; hide graphicsapply }
|
|||
type 1
|
||||
textscale .23
|
||||
group grpControlbutton
|
||||
rect 306 10 100 12
|
||||
rect 256 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -543,28 +354,6 @@ open in_vid_restart_popmenu ; hide graphics ; hide graphicsapply }
|
|||
}
|
||||
|
||||
|
||||
// itemDef {
|
||||
// name sound
|
||||
// group grpSystem
|
||||
// type ITEM_TYPE_YESNO
|
||||
// text "Doppler Sound:"
|
||||
// cvar "s_doppler"
|
||||
// rect 82 140 290 12
|
||||
// textalign ITEM_ALIGN_RIGHT
|
||||
// textalignx 142
|
||||
// textaligny 10
|
||||
// textscale .23
|
||||
// style WINDOW_STYLE_FILLED
|
||||
// backcolor 1 1 1 .07
|
||||
// forecolor 1 1 1 1
|
||||
// visible 0
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name applysystem
|
||||
group grpapplySystem
|
53
Projects/Android/z_vr_assets/ui/menus.txt
Normal file
|
@ -0,0 +1,53 @@
|
|||
// menu defs
|
||||
//
|
||||
{
|
||||
loadMenu { "ui/main.menu" }
|
||||
// loadMenu { "ui/joinserver.menu" } // NERVE - SMF - commented in for multiplayer
|
||||
loadMenu { "ui/setup.menu" }
|
||||
loadMenu { "ui/controls.menu" }
|
||||
loadMenu { "ui/cdkey.menu" }
|
||||
loadMenu { "ui/system.menu" }
|
||||
loadMenu { "ui/options.menu" }
|
||||
// loadMenu { "ui/cinematicmenu.menu" }
|
||||
loadMenu { "ui/credit.menu" }
|
||||
loadMenu { "ui/connect.menu" }
|
||||
loadMenu { "ui/quit.menu" }
|
||||
loadMenu { "ui/vid_restart.menu" }
|
||||
loadMenu { "ui/snd_restart.menu" }
|
||||
loadMenu { "ui/rec_restart.menu" }
|
||||
loadMenu { "ui/default.menu" }
|
||||
loadMenu { "ui/error.menu" }
|
||||
loadMenu { "ui/serverinfo.menu" }
|
||||
loadMenu { "ui/quitcredit.menu" }
|
||||
loadMenu { "ui/resetscore.menu" }
|
||||
loadMenu { "ui/multiplayer_pop.menu" }
|
||||
|
||||
loadMenu { "ui/play.menu" } // (mx) added
|
||||
loadMenu { "ui/load.menu" } // (mx) added
|
||||
// loadMenu { "ui/multiplayer.menu" } // (mx) added
|
||||
|
||||
loadMenu { "ui/briefing.menu" } //----(SA) added
|
||||
|
||||
|
||||
|
||||
// (SA) removed old q3a stuff so we don't get so many yellow startup warnings
|
||||
// loadMenu { "ui/player.menu" }
|
||||
// loadMenu { "ui/fight.menu" }
|
||||
// loadMenu { "ui/skirmish.menu" }
|
||||
// loadMenu { "ui/createserver.menu" }
|
||||
// loadMenu { "ui/help.menu" }
|
||||
// loadMenu { "ui/ordershelp.menu" }
|
||||
// loadMenu { "ui/mod.menu" }
|
||||
// loadMenu { "ui/demo.menu" }
|
||||
// loadMenu { "ui/demo_quit.menu" }
|
||||
// loadMenu { "ui/powerup.menu" }
|
||||
// loadMenu { "ui/password.menu" }
|
||||
// loadMenu { "ui/quake3.menu" }
|
||||
// loadMenu { "ui/addfilter.menu" }
|
||||
// loadMenu { "ui/findplayer.menu" }
|
||||
// loadMenu { "ui/endofgame.menu" }
|
||||
// loadMenu { "ui/createfavorite.menu" }
|
||||
|
||||
loadMenu { "ui/credits.menu" }
|
||||
loadMenu { "ui/help_popup.menu"}
|
||||
}
|
4062
Projects/Android/z_vr_assets/ui/notebook.menu
Normal file
|
@ -11,8 +11,7 @@ menuDef {
|
|||
focusColor 1 .75 0 1
|
||||
style 1
|
||||
border 1
|
||||
onOpen { setitemcolor fadebox backcolor 0 0 0 1 ;
|
||||
fadeout fadebox }
|
||||
onOpen { setitemcolor fadebox backcolor 0 0 0 1 ; fadeout fadebox; hide grpOptions ; show view }
|
||||
onEsc { close options_menu ; close setup_menu ; open main }
|
||||
|
||||
|
||||
|
@ -73,7 +72,7 @@ itemDef
|
|||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 172 10 100 12
|
||||
rect 256 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -177,7 +176,6 @@ itemDef {
|
|||
visible 1
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name performance
|
||||
type ITEM_TYPE_MULTI
|
||||
|
@ -196,8 +194,6 @@ itemDef {
|
|||
visible 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name performance
|
||||
group grpOptions
|
||||
|
@ -215,6 +211,24 @@ itemDef {
|
|||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name performance
|
||||
group grpOptions
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Particle Dist:"
|
||||
cvar "cg_particleDist"
|
||||
cvarFloatList { "normal" 1024 "far" 2048 "off" 0 "near" 512 }
|
||||
rect 82 135 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
|
@ -224,7 +238,7 @@ itemDef {
|
|||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 270 10 100 12
|
||||
rect 106 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -259,7 +273,22 @@ itemDef {
|
|||
visible 0
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
group grpOptions
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Draw HUD: "
|
||||
cvar "vr_draw_hud"
|
||||
rect 82 45 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
|
@ -267,7 +296,7 @@ itemDef {
|
|||
type ITEM_TYPE_SLIDER
|
||||
text "HUD Alpha:"
|
||||
cvarfloat "cg_hudAlpha" .6 .1 1
|
||||
rect 82 45 290 12
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -278,7 +307,43 @@ itemDef {
|
|||
visible 0
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name view
|
||||
group grpOptions
|
||||
type ITEM_TYPE_YESNO
|
||||
text "Laser Sight: "
|
||||
cvar "vr_lasersight"
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 1
|
||||
}
|
||||
|
||||
itemDef {
|
||||
cvarTest "r_ignorehwgamma"
|
||||
showcvar { "0" }
|
||||
name view
|
||||
group grpOptions
|
||||
type ITEM_TYPE_SLIDER
|
||||
text "Brightness:"
|
||||
cvarfloat "r_gamma" 1 0.5 3
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name fadebox
|
|
@ -14,12 +14,10 @@ menuDef {
|
|||
focusColor 1 .75 0 1
|
||||
style 1
|
||||
border 1
|
||||
onOpen { setitemcolor fadebox backcolor 0 0 0 1 ; fadeout fadebox ; hide grpSystem ; hide grpapplysystem ; show graphics ; show graphicsapply }
|
||||
onOpen { setitemcolor fadebox backcolor 0 0 0 1 ; fadeout fadebox ; hide grpSystem ; hide grpapplysystem ; show graphics ; show graphicsapply; }
|
||||
onEsc { close system_menu ; close setup_menu ; open main }
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef
|
||||
{
|
||||
name window
|
||||
|
@ -46,7 +44,7 @@ itemDef {
|
|||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 56 10 100 12
|
||||
rect 106 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
|
@ -89,101 +87,24 @@ itemDef {
|
|||
decoration
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
text "Set Recommended"
|
||||
type 1
|
||||
textscale .24
|
||||
group grpsystem
|
||||
// background "ui/assets/button_back.tga"
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 82 30 290 12
|
||||
textalign 1
|
||||
textalignx 145
|
||||
textaligny 12
|
||||
forecolor 1 1 1 1
|
||||
backcolor 1 1 1 .07
|
||||
visible 1
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
open rec_restart_popmenu ; hide graphics ; hide graphicsapply }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
text "Quality:"
|
||||
type ITEM_TYPE_MULTI
|
||||
cvar "ui_glCustom"
|
||||
cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 }
|
||||
|
||||
cvarTest "ui_glCustom"
|
||||
hideCvar { "999" } // 999 is 'recommended'
|
||||
|
||||
rect 82 55 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript update "ui_glCustom" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
text "Quality: Recommended"
|
||||
type ITEM_TYPE_BUTTON
|
||||
|
||||
cvarTest "ui_glCustom"
|
||||
showCvar { "999" } // 999 is 'recommended'
|
||||
|
||||
rect 82 55 290 12
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
textalignx 162
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action {
|
||||
setcvar ui_glCustom 0; // go back to regular selection group
|
||||
uiScript update "ui_glCustom" }
|
||||
}
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
text "GL Extensions:"
|
||||
cvar "r_allowExtensions"
|
||||
rect 82 70 290 12
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Refresh Rate:"
|
||||
cvar "vr_refresh"
|
||||
cvarFloatList { "72 (recommended)" 72 "80" 80 "90" 90 "120" 120 }
|
||||
rect 82 30 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
visible 0
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
|
@ -191,7 +112,7 @@ itemDef {
|
|||
text "Anisotropic Filter Level:"
|
||||
cvar "r_ext_texture_filter_anisotropic"
|
||||
cvarFloatList { "1" 1 "2" 2 "4" 4 "8" 8 "16" 16 }
|
||||
rect 82 85 290 12
|
||||
rect 82 60 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -203,25 +124,6 @@ itemDef {
|
|||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Color Depth:"
|
||||
cvar "r_colorbits"
|
||||
cvarFloatList { "Desktop Default" 0 "16-bit" 16 "32-bit" 32 }
|
||||
rect 82 100 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom ; uiScript update "r_colorbits" }
|
||||
}
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
|
@ -229,7 +131,7 @@ itemDef {
|
|||
text "Lighting:"
|
||||
cvar "r_vertexlight"
|
||||
cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1 }
|
||||
rect 82 130 290 12
|
||||
rect 82 75 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -247,8 +149,8 @@ itemDef {
|
|||
type ITEM_TYPE_MULTI
|
||||
text "Geometric Detail:"
|
||||
cvar "r_lodbias"
|
||||
cvarFloatList { "High" 0 "Medium" 1 "Low" 2 }
|
||||
rect 82 145 290 12
|
||||
cvarFloatList { "High" -2.4 "Medium" -0.6 "Low" 2 }
|
||||
rect 82 90 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -267,7 +169,7 @@ itemDef {
|
|||
text "Character Textures:"
|
||||
cvar "r_picmip2"
|
||||
cvarFloatList { "Low" 3 "Normal" 2 "High" 1 "Extra" 0 }
|
||||
rect 82 160 290 12
|
||||
rect 82 105 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -286,7 +188,7 @@ itemDef {
|
|||
text "General Textures:"
|
||||
cvar "r_picmip"
|
||||
cvarFloatList { "Low" 2 "Normal" 1 "High" 0 }
|
||||
rect 82 175 290 12
|
||||
rect 82 120 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -298,12 +200,6 @@ itemDef {
|
|||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
|
@ -311,7 +207,7 @@ itemDef {
|
|||
text "Texture Filter:"
|
||||
cvar "r_textureMode"
|
||||
cvarStrList { "No filter", "GL_NEAREST", "Bilinear (no mipmap)", "GL_LINEAR", "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" }
|
||||
rect 82 190 290 12
|
||||
rect 82 135 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -329,7 +225,7 @@ itemDef {
|
|||
type ITEM_TYPE_YESNO
|
||||
text "Compress Textures:"
|
||||
cvar "r_ext_compressed_textures"
|
||||
rect 82 205 290 12
|
||||
rect 82 150 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -340,25 +236,6 @@ itemDef {
|
|||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_MULTI
|
||||
text "Texture Quality:"
|
||||
cvar "r_texturebits"
|
||||
cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
|
||||
rect 82 220 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
itemDef {
|
||||
name graphics
|
||||
|
@ -366,7 +243,7 @@ itemDef {
|
|||
type ITEM_TYPE_SLIDER
|
||||
text "Brightness:"
|
||||
cvarfloat "r_gamma" 1 0.5 3
|
||||
rect 82 235 290 12
|
||||
rect 82 165 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
|
@ -382,65 +259,6 @@ itemDef {
|
|||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
//
|
||||
// Nvidia
|
||||
//
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
|
||||
text "Nvidia Distance Fog:"
|
||||
cvar "r_ext_NV_fog_dist"
|
||||
|
||||
// would be nice to be able to do an extension check from the menu
|
||||
// extensionTest "GL_NV_fog_distance"
|
||||
|
||||
rect 82 250 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .23
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// ATI
|
||||
//
|
||||
itemDef {
|
||||
name graphics
|
||||
group grpSystem
|
||||
type ITEM_TYPE_YESNO
|
||||
|
||||
text "Trueform:"
|
||||
cvar "r_ext_ATI_pntriangles"
|
||||
|
||||
// would be nice to be able to do an extension check from the menu
|
||||
// extensionTest "GL_ATIX_pn_triangles"
|
||||
|
||||
rect 82 265 290 12
|
||||
textalign ITEM_ALIGN_RIGHT
|
||||
textalignx 142
|
||||
textaligny 10
|
||||
textscale .22
|
||||
style WINDOW_STYLE_FILLED
|
||||
backcolor 1 1 1 .07
|
||||
forecolor 1 1 1 1
|
||||
visible 0
|
||||
action { uiScript glCustom }
|
||||
}
|
||||
|
||||
|
||||
//cvar_t *r_ext_ATI_pntriangles;
|
||||
//cvar_t *r_ati_truform_tess;
|
||||
//cvar_t *r_ati_truform_mode;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -508,31 +326,6 @@ open vid_restart_popmenu ; hide graphics ; hide graphicsapply }
|
|||
decoration
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
itemDef {
|
||||
name ctr_driver
|
||||
text "Driver info"
|
||||
type 1
|
||||
// textfont UI_FONT_NORMAL
|
||||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
background "ui/assets/button_back.tga"
|
||||
rect 180 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
||||
forecolor .9 .9 .9 .8
|
||||
backcolor .1 .1 .1 0
|
||||
visible 1
|
||||
action { play "sound/misc/kcaction.wav" ;
|
||||
hide grpSystem ; show driver }
|
||||
mouseEnter { show message_driver ; setitemcolor ctr_driver backcolor .3 .3 .3 0 }
|
||||
mouseExit { hide message_driver ; setitemcolor ctr_driver backcolor .1 .1 .1 0 }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -563,7 +356,7 @@ itemDef {
|
|||
textscale .22
|
||||
group grpSystembutton
|
||||
style WINDOW_STYLE_FILLED
|
||||
rect 306 10 100 12
|
||||
rect 256 10 100 12
|
||||
textalign 1
|
||||
textalignx 50
|
||||
textaligny 10
|
|
@ -50,7 +50,7 @@ import static android.system.Os.setenv;
|
|||
private static final String TAG = "RTCWQuest";
|
||||
private static final String APPLICATION = "RTCWQuest";
|
||||
|
||||
private int permissionCount = 0;
|
||||
private boolean permissionsGranted = false;
|
||||
private static final int READ_EXTERNAL_STORAGE_PERMISSION_ID = 1;
|
||||
private static final int WRITE_EXTERNAL_STORAGE_PERMISSION_ID = 2;
|
||||
|
||||
|
@ -194,15 +194,8 @@ import static android.system.Os.setenv;
|
|||
GLES3JNIActivity.this,
|
||||
new String[] {Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||
WRITE_EXTERNAL_STORAGE_PERMISSION_ID);
|
||||
}
|
||||
else
|
||||
{
|
||||
permissionCount++;
|
||||
}
|
||||
|
||||
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
!= PackageManager.PERMISSION_GRANTED)
|
||||
{
|
||||
} else if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)
|
||||
!= PackageManager.PERMISSION_GRANTED){
|
||||
ActivityCompat.requestPermissions(
|
||||
GLES3JNIActivity.this,
|
||||
new String[] {Manifest.permission.READ_EXTERNAL_STORAGE},
|
||||
|
@ -210,10 +203,10 @@ import static android.system.Os.setenv;
|
|||
}
|
||||
else
|
||||
{
|
||||
permissionCount++;
|
||||
permissionsGranted = true;
|
||||
}
|
||||
|
||||
if (permissionCount == 2) {
|
||||
if (permissionsGranted) {
|
||||
// Permissions have already been granted.
|
||||
create();
|
||||
}
|
||||
|
@ -223,21 +216,13 @@ import static android.system.Os.setenv;
|
|||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] results) {
|
||||
if (requestCode == READ_EXTERNAL_STORAGE_PERMISSION_ID) {
|
||||
if (results.length > 0 && results[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
permissionCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (results.length > 0 && results[0] != PackageManager.PERMISSION_GRANTED) {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (requestCode == WRITE_EXTERNAL_STORAGE_PERMISSION_ID) {
|
||||
if (results.length > 0 && results[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
permissionCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (results.length > 0 && results[0] != PackageManager.PERMISSION_GRANTED) {
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
@ -252,17 +237,32 @@ import static android.system.Os.setenv;
|
|||
//Copy the command line params file
|
||||
copy_asset("/sdcard/RTCWQuest", "commandline.txt", false);
|
||||
|
||||
//Copy the weapon adjustment config
|
||||
copy_asset("/sdcard/RTCWQuest/Main", "weapons_vr.cfg", false);
|
||||
|
||||
//and the demo version - if required
|
||||
copy_asset("/sdcard/RTCWQuest/Main", "pak0.pk3", false);
|
||||
|
||||
//and the vr weapons
|
||||
copy_asset("/sdcard/RTCWQuest/Main", "z_zvr_weapons.pk3", true);
|
||||
|
||||
//and the vr menu pk3
|
||||
copy_asset("/sdcard/RTCWQuest/Main", "z_rtcwquest_vrmenu.pk3", true);
|
||||
//and some additional vr assets
|
||||
copy_asset("/sdcard/RTCWQuest/Main", "z_vr_assets.pk3", true);
|
||||
// (delete asset pak from previous version)
|
||||
File oldAssetPak = new File("/sdcard/RTCWQuest/Main/z_rtcwquest_vrmenu.pk3");
|
||||
if (oldAssetPak.exists()) {
|
||||
try {
|
||||
oldAssetPak.delete();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
// (weapon adjustment was moved to pak, users can still use weapons_user.cfg to re-adjust)
|
||||
File oldWeaponAdjustment = new File("/sdcard/RTCWQuest/Main/weapons_vr.cfg");
|
||||
if (oldWeaponAdjustment.exists()) {
|
||||
try {
|
||||
oldWeaponAdjustment.delete();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
//and the venom scripting improvements pak (thank-you _HELLBARON_ !!)
|
||||
copy_asset("/sdcard/RTCWQuest/Main", "sp_vpak8.pk3", false);
|
||||
|
|