Merge pull request #6 from petr666/feature/comfort-vignette

Comfort vignette
This commit is contained in:
Simon 2022-03-09 19:03:31 +00:00 committed by GitHub
commit 6755c8509b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1175 additions and 224 deletions

View file

@ -2657,6 +2657,8 @@ Q3UIOBJ_ = \
$(B)/$(BASEGAME)/ui/ui_teamorders.o \
$(B)/$(BASEGAME)/ui/ui_video.o \
$(B)/$(BASEGAME)/ui/ui_vr.o \
$(B)/$(BASEGAME)/ui/ui_controls3.o \
$(B)/$(BASEGAME)/ui/ui_comfort.o \
\
$(B)/$(BASEGAME)/qcommon/q_math.o \
$(B)/$(BASEGAME)/qcommon/q_shared.o

View file

@ -28,19 +28,19 @@ set vr_button_map_SECONDARYTHUMBSTICK_ALT ""
set vr_button_map_PRIMARYTHUMBSTICK ""
set vr_button_map_PRIMARYTHUMBSTICK_ALT ""
set vr_button_map_RTHUMBFORWARD "+weapon_select"
set vr_button_map_RTHUMBFORWARD_ALT "weapon 3"
set vr_button_map_RTHUMBFORWARD_ALT "weapon 2"
set vr_button_map_RTHUMBFORWARDRIGHT ""
set vr_button_map_RTHUMBFORWARDRIGHT_ALT "weapon 2"
set vr_button_map_RTHUMBFORWARDRIGHT_ALT "weapon 3"
set vr_button_map_RTHUMBRIGHT ""
set vr_button_map_RTHUMBRIGHT_ALT "weapon 5"
set vr_button_map_RTHUMBRIGHT_ALT "weapon 4"
set vr_button_map_RTHUMBBACKRIGHT ""
set vr_button_map_RTHUMBBACKRIGHT_ALT "weapon 4"
set vr_button_map_RTHUMBBACKRIGHT_ALT "weapon 5"
set vr_button_map_RTHUMBBACK "uturn"
set vr_button_map_RTHUMBBACK_ALT "weapon 7"
set vr_button_map_RTHUMBBACK_ALT "weapon 6"
set vr_button_map_RTHUMBBACKLEFT ""
set vr_button_map_RTHUMBBACKLEFT_ALT "weapon 8"
set vr_button_map_RTHUMBBACKLEFT_ALT "weapon 7"
set vr_button_map_RTHUMBLEFT ""
set vr_button_map_RTHUMBLEFT_ALT "weapon 6"
set vr_button_map_RTHUMBLEFT_ALT "weapon 8"
set vr_button_map_RTHUMBFORWARDLEFT ""
set vr_button_map_RTHUMBFORWARDLEFT_ALT "weapon 9"
set vr_button_map_SECONDARYTRIGGER "+moveup"

View file

@ -2585,6 +2585,53 @@ static void CG_DrawWeapReticle( void )
}
}
/*
==============
CG_DrawVignette
==============
*/
float currentComfortVignetteValue = 0.0f;
static void CG_DrawVignette( void )
{
float comfortVignetteValue = trap_Cvar_VariableValue( "vr_comfortVignette" );
if (comfortVignetteValue <= 0.0f || comfortVignetteValue > 1.0f)
{
return;
}
if (VectorLength(cg.predictedPlayerState.velocity) > 30.0)
{
if (currentComfortVignetteValue < comfortVignetteValue)
{
currentComfortVignetteValue += comfortVignetteValue * 0.05;
if (currentComfortVignetteValue > 1.0f)
currentComfortVignetteValue = 1.0f;
}
} else{
if (currentComfortVignetteValue > 0.0f)
currentComfortVignetteValue -= comfortVignetteValue * 0.05;
}
if (currentComfortVignetteValue > 0.0f && currentComfortVignetteValue <= 1.0f && !(vr->weapon_zoomed))
{
int x = (int)(0 + currentComfortVignetteValue * cg.refdef.width / 3);
int w = (int)(cg.refdef.width - 2 * x);
int y = (int)(0 + currentComfortVignetteValue * cg.refdef.height / 3);
int h = (int)(cg.refdef.height - 2 * y);
// sides
trap_R_DrawStretchPic( 0, 0, x, cg.refdef.height, 0, 0, 1, 1, cgs.media.maskShader );
trap_R_DrawStretchPic( cg.refdef.width - x, 0, x, cg.refdef.height, 0, 0, 1, 1, cgs.media.maskShader );
// top/bottom
trap_R_DrawStretchPic( x, 0, cg.refdef.width - x, y, 0, 0, 1, 1, cgs.media.maskShader );
trap_R_DrawStretchPic( x, cg.refdef.height - y, cg.refdef.width - x, y, 0, 0, 1, 1, cgs.media.maskShader );
// vignette
trap_R_DrawStretchPic( x, y, w, h, 0, 0, 1, 1, cgs.media.vignetteShader );
}
}
/*
=================
CG_Draw2D
@ -2627,6 +2674,8 @@ static void CG_Draw2D(stereoFrame_t stereoFrame)
// don't draw any status if dead or the scoreboard is being explicitly shown
if ( !cg.showScores && cg.snap->ps.stats[STAT_HEALTH] > 0 ) {
CG_DrawVignette();
#ifdef MISSIONPACK
if ( cg_drawStatus.integer ) {
Menu_PaintAll();

View file

@ -1003,6 +1003,9 @@ typedef struct {
sfxHandle_t wstbimpdSound;
sfxHandle_t wstbactvSound;
// comfort vignette
qhandle_t vignetteShader;
qhandle_t maskShader;
} cgMedia_t;

View file

@ -1051,6 +1051,8 @@ static void CG_RegisterGraphics( void ) {
//Load from pakQ3Q
cgs.media.reticleShader = trap_R_RegisterShader( "gfx/weapon/scope" );
cgs.media.vignetteShader = trap_R_RegisterShader( "gfx/vignette" );
cgs.media.maskShader = trap_R_RegisterShader( "gfx/mask" );
//Used for the weapon selector
cgs.media.smallSphereModel = trap_R_RegisterModel("models/powerups/health/small_sphere.md3");

View file

@ -3562,7 +3562,7 @@ void CL_Init( void ) {
cl_showMouseRate = Cvar_Get ("cl_showmouserate", "0", 0);
cl_allowDownload = Cvar_Get ("cl_allowDownload", "0", CVAR_ARCHIVE);
cl_allowDownload = Cvar_Get ("cl_allowDownload", "1", CVAR_ARCHIVE);
#ifdef USE_CURL_DLOPEN
cl_cURLLib = Cvar_Get("cl_cURLLib", DEFAULT_CURL_LIB, CVAR_ARCHIVE | CVAR_PROTECTED);
#endif

View file

@ -1015,7 +1015,7 @@ void UI_Cache_f( void ) {
ServerOptions_Cache();
DriverInfo_Cache();
GraphicsOptions_Cache();
UI_DisplayOptionsMenu_Cache();
// UI_DisplayOptionsMenu_Cache();
UI_SoundOptionsMenu_Cache();
UI_NetworkOptionsMenu_Cache();
UI_SPLevelMenu_Cache();
@ -1028,7 +1028,7 @@ void UI_Cache_f( void ) {
// UI_LoadConfig_Cache();
// UI_SaveConfigMenu_Cache();
UI_BotSelectMenu_Cache();
UI_CDKeyMenu_Cache();
// UI_CDKeyMenu_Cache();
UI_ModsMenu_Cache();
}

View file

@ -0,0 +1,304 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
Quake III Arena source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
/*
=======================================================================
COMFORT OPTIONS MENU
=======================================================================
*/
#include "ui_local.h"
#define ART_FRAMEL "menu/art/frame2_l"
#define ART_FRAMER "menu/art/frame1_r"
#define ART_BACK0 "menu/art/back_0"
#define ART_BACK1 "menu/art/back_1"
#define VR_X_POS 360
#define ID_COMFORTVIGNETTE 127
#define ID_HEIGHTADJUST 128
#define ID_SNAPTURN 129
#define ID_ROLLHIT 130
#define ID_HAPTICINTENSITY 131
#define ID_HUDDEPTH 132
#define ID_HUDYOFFSET 133
#define ID_BACK 134
#define NUM_HUDDEPTH 6
typedef struct {
menuframework_s menu;
menutext_s banner;
menubitmap_s framel;
menubitmap_s framer;
menuslider_s comfortvignette;
menuslider_s heightadjust;
menulist_s snapturn;
menuradiobutton_s rollhit;
menuslider_s hapticintensity;
menulist_s huddepth;
menuslider_s hudyoffset;
menubitmap_s back;
} comfort_t;
static comfort_t s_comfort;
static void Comfort_SetMenuItems( void ) {
s_comfort.comfortvignette.curvalue = trap_Cvar_VariableValue( "vr_comfortVignette" );
s_comfort.heightadjust.curvalue = trap_Cvar_VariableValue( "vr_heightAdjust" );
s_comfort.snapturn.curvalue = (int)trap_Cvar_VariableValue( "vr_snapturn" ) / 45;
s_comfort.rollhit.curvalue = trap_Cvar_VariableValue( "vr_rollWhenHit" ) != 0;
s_comfort.hapticintensity.curvalue = trap_Cvar_VariableValue( "vr_hapticIntensity" );
s_comfort.huddepth.curvalue = (int)trap_Cvar_VariableValue( "vr_hudDepth" ) % NUM_HUDDEPTH;
s_comfort.hudyoffset.curvalue = trap_Cvar_VariableValue( "vr_hudYOffset" ) + 200;
}
static void Comfort_MenuEvent( void* ptr, int notification ) {
if( notification != QM_ACTIVATED ) {
return;
}
switch( ((menucommon_s*)ptr)->id ) {
case ID_COMFORTVIGNETTE:
trap_Cvar_SetValue( "vr_comfortVignette", s_comfort.comfortvignette.curvalue );
break;
case ID_HEIGHTADJUST:
trap_Cvar_SetValue( "vr_heightAdjust", s_comfort.heightadjust.curvalue );
break;
case ID_SNAPTURN:
trap_Cvar_SetValue( "vr_snapturn", s_comfort.snapturn.curvalue * 45 );
break;
case ID_ROLLHIT:
trap_Cvar_SetValue( "vr_rollWhenHit", s_comfort.rollhit.curvalue );
break;
case ID_HAPTICINTENSITY:
trap_Cvar_SetValue( "vr_hapticIntensity", s_comfort.hapticintensity.curvalue);
break;
case ID_HUDDEPTH:
trap_Cvar_SetValue( "vr_hudDepth", s_comfort.huddepth.curvalue );
break;
case ID_HUDYOFFSET:
trap_Cvar_SetValue( "vr_hudYOffset", s_comfort.hudyoffset.curvalue - 200);
break;
case ID_BACK:
UI_PopMenu();
break;
}
}
static void Comfort_MenuInit( void ) {
int y;
static const char *s_hud_depths[] =
{
"Very Close",
"Close",
"Middle",
"Further",
"Far",
"Distant",
NULL
};
static const char *s_snapturn[] =
{
"Smooth Turning",
"45 Degrees",
"90 Degrees",
NULL
};
memset( &s_comfort, 0 ,sizeof(comfort_t) );
Comfort_Cache();
s_comfort.menu.wrapAround = qtrue;
s_comfort.menu.fullscreen = qtrue;
s_comfort.banner.generic.type = MTYPE_BTEXT;
s_comfort.banner.generic.x = 320;
s_comfort.banner.generic.y = 16;
s_comfort.banner.string = "COMFORT OPTIONS";
s_comfort.banner.color = color_white;
s_comfort.banner.style = UI_CENTER;
s_comfort.framel.generic.type = MTYPE_BITMAP;
s_comfort.framel.generic.name = ART_FRAMEL;
s_comfort.framel.generic.flags = QMF_INACTIVE;
s_comfort.framel.generic.x = 0;
s_comfort.framel.generic.y = 78;
s_comfort.framel.width = 256;
s_comfort.framel.height = 329;
s_comfort.framer.generic.type = MTYPE_BITMAP;
s_comfort.framer.generic.name = ART_FRAMER;
s_comfort.framer.generic.flags = QMF_INACTIVE;
s_comfort.framer.generic.x = 376;
s_comfort.framer.generic.y = 76;
s_comfort.framer.width = 256;
s_comfort.framer.height = 334;
y = 180;
s_comfort.comfortvignette.generic.type = MTYPE_SLIDER;
s_comfort.comfortvignette.generic.x = VR_X_POS;
s_comfort.comfortvignette.generic.y = y;
s_comfort.comfortvignette.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.comfortvignette.generic.name = "Comfort Vignette:";
s_comfort.comfortvignette.generic.id = ID_COMFORTVIGNETTE;
s_comfort.comfortvignette.generic.callback = Comfort_MenuEvent;
s_comfort.comfortvignette.minvalue = 0.0f;
s_comfort.comfortvignette.maxvalue = 1.0f;
y += BIGCHAR_HEIGHT+2;
s_comfort.heightadjust.generic.type = MTYPE_SLIDER;
s_comfort.heightadjust.generic.x = VR_X_POS;
s_comfort.heightadjust.generic.y = y;
s_comfort.heightadjust.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.heightadjust.generic.name = "Height Adjust:";
s_comfort.heightadjust.generic.id = ID_HEIGHTADJUST;
s_comfort.heightadjust.generic.callback = Comfort_MenuEvent;
s_comfort.heightadjust.minvalue = 0.0f;
s_comfort.heightadjust.maxvalue = 1.0f;
y += BIGCHAR_HEIGHT+2;
s_comfort.snapturn.generic.type = MTYPE_SPINCONTROL;
s_comfort.snapturn.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.snapturn.generic.x = VR_X_POS;
s_comfort.snapturn.generic.y = y;
s_comfort.snapturn.generic.name = "Turning Mode:";
s_comfort.snapturn.generic.callback = Comfort_MenuEvent;
s_comfort.snapturn.generic.id = ID_SNAPTURN;
s_comfort.snapturn.itemnames = s_snapturn;
s_comfort.snapturn.numitems = 3;
y += BIGCHAR_HEIGHT+2;
s_comfort.rollhit.generic.type = MTYPE_RADIOBUTTON;
s_comfort.rollhit.generic.name = "Roll When Hit:";
s_comfort.rollhit.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.rollhit.generic.callback = Comfort_MenuEvent;
s_comfort.rollhit.generic.id = ID_ROLLHIT;
s_comfort.rollhit.generic.x = VR_X_POS;
s_comfort.rollhit.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_comfort.hapticintensity.generic.type = MTYPE_SLIDER;
s_comfort.hapticintensity.generic.x = VR_X_POS;
s_comfort.hapticintensity.generic.y = y;
s_comfort.hapticintensity.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.hapticintensity.generic.name = "Haptic Intensity:";
s_comfort.hapticintensity.generic.id = ID_HAPTICINTENSITY;
s_comfort.hapticintensity.generic.callback = Comfort_MenuEvent;
s_comfort.hapticintensity.minvalue = 0;
s_comfort.hapticintensity.maxvalue = 1.0;
y += BIGCHAR_HEIGHT+2;
s_comfort.huddepth.generic.type = MTYPE_SPINCONTROL;
s_comfort.huddepth.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.huddepth.generic.x = VR_X_POS;
s_comfort.huddepth.generic.y = y;
s_comfort.huddepth.generic.name = "HUD Depth:";
s_comfort.huddepth.generic.callback = Comfort_MenuEvent;
s_comfort.huddepth.generic.id = ID_HUDDEPTH;
s_comfort.huddepth.itemnames = s_hud_depths;
s_comfort.huddepth.numitems = NUM_HUDDEPTH;
y += BIGCHAR_HEIGHT+2;
s_comfort.hudyoffset.generic.type = MTYPE_SLIDER;
s_comfort.hudyoffset.generic.x = VR_X_POS;
s_comfort.hudyoffset.generic.y = y;
s_comfort.hudyoffset.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_comfort.hudyoffset.generic.name = "HUD Y Offset:";
s_comfort.hudyoffset.generic.id = ID_HUDYOFFSET;
s_comfort.hudyoffset.generic.callback = Comfort_MenuEvent;
s_comfort.hudyoffset.minvalue = 0;
s_comfort.hudyoffset.maxvalue = 400;
s_comfort.back.generic.type = MTYPE_BITMAP;
s_comfort.back.generic.name = ART_BACK0;
s_comfort.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
s_comfort.back.generic.callback = Comfort_MenuEvent;
s_comfort.back.generic.id = ID_BACK;
s_comfort.back.generic.x = 0;
s_comfort.back.generic.y = 480-64;
s_comfort.back.width = 128;
s_comfort.back.height = 64;
s_comfort.back.focuspic = ART_BACK1;
Menu_AddItem( &s_comfort.menu, &s_comfort.banner );
Menu_AddItem( &s_comfort.menu, &s_comfort.framel );
Menu_AddItem( &s_comfort.menu, &s_comfort.framer );
Menu_AddItem( &s_comfort.menu, &s_comfort.comfortvignette );
Menu_AddItem( &s_comfort.menu, &s_comfort.heightadjust );
Menu_AddItem( &s_comfort.menu, &s_comfort.snapturn );
Menu_AddItem( &s_comfort.menu, &s_comfort.rollhit );
Menu_AddItem( &s_comfort.menu, &s_comfort.hapticintensity );
Menu_AddItem( &s_comfort.menu, &s_comfort.huddepth );
Menu_AddItem( &s_comfort.menu, &s_comfort.hudyoffset );
Menu_AddItem( &s_comfort.menu, &s_comfort.back );
Comfort_SetMenuItems();
}
/*
===============
Comfort_Cache
===============
*/
void Comfort_Cache( void ) {
trap_R_RegisterShaderNoMip( ART_FRAMEL );
trap_R_RegisterShaderNoMip( ART_FRAMER );
trap_R_RegisterShaderNoMip( ART_BACK0 );
trap_R_RegisterShaderNoMip( ART_BACK1 );
}
/*
===============
UI_ComfortMenu
===============
*/
void UI_ComfortMenu( void ) {
Comfort_MenuInit();
UI_PushMenu( &s_comfort.menu );
}

View file

@ -0,0 +1,284 @@
/*
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.
Quake III Arena source code is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Quake III Arena source code; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
===========================================================================
*/
//
/*
=======================================================================
CONTROLS OPTIONS MENU
=======================================================================
*/
#include "ui_local.h"
#define ART_FRAMEL "menu/art/frame2_l"
#define ART_FRAMER "menu/art/frame1_r"
#define ART_BACK0 "menu/art/back_0"
#define ART_BACK1 "menu/art/back_1"
#define VR_X_POS 360
#define ID_AUTOSWITCH 127
#define ID_SCOPE 128
#define ID_TWOHANDED 129
#define ID_DIRECTIONMODE 130
#define ID_RIGHTHANDED 131
#define ID_WEAPONPITCH 132
#define ID_ALTKEY 133
#define ID_BACK 134
#define NUM_DIRECTIONMODE 2
typedef struct {
menuframework_s menu;
menutext_s banner;
menubitmap_s framel;
menubitmap_s framer;
menuradiobutton_s autoswitch;
menuradiobutton_s scope;
menuradiobutton_s twohanded;
menulist_s directionmode;
menuradiobutton_s righthanded;
menuslider_s weaponpitch;
menuradiobutton_s altkey;
menubitmap_s back;
} controls3_t;
static controls3_t s_controls3;
static void Controls3_SetMenuItems( void ) {
s_controls3.autoswitch.curvalue = trap_Cvar_VariableValue( "cg_autoswitch" ) != 0;
s_controls3.scope.curvalue = trap_Cvar_VariableValue( "vr_weaponScope" ) != 0;
s_controls3.twohanded.curvalue = trap_Cvar_VariableValue( "vr_twoHandedWeapons" ) != 0;
s_controls3.directionmode.curvalue = (int)trap_Cvar_VariableValue( "vr_directionMode" ) % NUM_DIRECTIONMODE;
s_controls3.righthanded.curvalue = trap_Cvar_VariableValue( "vr_righthanded" ) != 0;
s_controls3.weaponpitch.curvalue = trap_Cvar_VariableValue( "vr_weaponPitch" ) + 25;
s_controls3.altkey.curvalue = trap_Cvar_VariableValue( "vr_altKeyEnabled" ) != 0;
}
static void Controls3_MenuEvent( void* ptr, int notification ) {
if( notification != QM_ACTIVATED ) {
return;
}
switch( ((menucommon_s*)ptr)->id ) {
case ID_AUTOSWITCH:
trap_Cvar_SetValue( "cg_autoswitch", s_controls3.autoswitch.curvalue );
break;
case ID_SCOPE:
trap_Cvar_SetValue( "vr_weaponScope", s_controls3.scope.curvalue );
break;
case ID_TWOHANDED:
trap_Cvar_SetValue( "vr_twoHandedWeapons", s_controls3.twohanded.curvalue );
break;
case ID_DIRECTIONMODE:
trap_Cvar_SetValue( "vr_directionMode", s_controls3.directionmode.curvalue );
break;
case ID_RIGHTHANDED:
trap_Cvar_SetValue( "vr_righthanded", s_controls3.righthanded.curvalue );
break;
case ID_WEAPONPITCH:
trap_Cvar_SetValue( "vr_weaponPitch", s_controls3.weaponpitch.curvalue - 25 );
break;
case ID_ALTKEY:
trap_Cvar_SetValue( "vr_altKeyEnabled", s_controls3.altkey.curvalue );
break;
case ID_BACK:
UI_PopMenu();
break;
}
}
static void Controls3_MenuInit( void ) {
int y;
static const char *s_directionmode[] =
{
"HMD (Default)",
"Off-hand Controller",
NULL
};
memset( &s_controls3, 0 ,sizeof(controls3_t) );
Controls3_Cache();
s_controls3.menu.wrapAround = qtrue;
s_controls3.menu.fullscreen = qtrue;
s_controls3.banner.generic.type = MTYPE_BTEXT;
s_controls3.banner.generic.x = 320;
s_controls3.banner.generic.y = 16;
s_controls3.banner.string = "CONTROLS";
s_controls3.banner.color = color_white;
s_controls3.banner.style = UI_CENTER;
s_controls3.framel.generic.type = MTYPE_BITMAP;
s_controls3.framel.generic.name = ART_FRAMEL;
s_controls3.framel.generic.flags = QMF_INACTIVE;
s_controls3.framel.generic.x = 0;
s_controls3.framel.generic.y = 78;
s_controls3.framel.width = 256;
s_controls3.framel.height = 329;
s_controls3.framer.generic.type = MTYPE_BITMAP;
s_controls3.framer.generic.name = ART_FRAMER;
s_controls3.framer.generic.flags = QMF_INACTIVE;
s_controls3.framer.generic.x = 376;
s_controls3.framer.generic.y = 76;
s_controls3.framer.width = 256;
s_controls3.framer.height = 334;
y = 180;
s_controls3.autoswitch.generic.type = MTYPE_RADIOBUTTON;
s_controls3.autoswitch.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.autoswitch.generic.name = "Autoswitch Weapons:";
s_controls3.autoswitch.generic.id = ID_AUTOSWITCH;
s_controls3.autoswitch.generic.callback = Controls3_MenuEvent;
s_controls3.autoswitch.generic.x = VR_X_POS;
s_controls3.autoswitch.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_controls3.scope.generic.type = MTYPE_RADIOBUTTON;
s_controls3.scope.generic.name = "Railgun Scope:";
s_controls3.scope.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.scope.generic.callback = Controls3_MenuEvent;
s_controls3.scope.generic.id = ID_SCOPE;
s_controls3.scope.generic.x = VR_X_POS;
s_controls3.scope.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_controls3.twohanded.generic.type = MTYPE_RADIOBUTTON;
s_controls3.twohanded.generic.name = "Two-Handed Weapons:";
s_controls3.twohanded.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.twohanded.generic.callback = Controls3_MenuEvent;
s_controls3.twohanded.generic.id = ID_TWOHANDED;
s_controls3.twohanded.generic.x = VR_X_POS;
s_controls3.twohanded.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_controls3.directionmode.generic.type = MTYPE_SPINCONTROL;
s_controls3.directionmode.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.directionmode.generic.x = VR_X_POS;
s_controls3.directionmode.generic.y = y;
s_controls3.directionmode.generic.name = "Direction Mode:";
s_controls3.directionmode.generic.callback = Controls3_MenuEvent;
s_controls3.directionmode.generic.id = ID_DIRECTIONMODE;
s_controls3.directionmode.itemnames = s_directionmode;
s_controls3.directionmode.numitems = NUM_DIRECTIONMODE;
y += BIGCHAR_HEIGHT+2;
s_controls3.righthanded.generic.type = MTYPE_RADIOBUTTON;
s_controls3.righthanded.generic.name = "Right-Handed:";
s_controls3.righthanded.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.righthanded.generic.callback = Controls3_MenuEvent;
s_controls3.righthanded.generic.id = ID_RIGHTHANDED;
s_controls3.righthanded.generic.x = VR_X_POS;
s_controls3.righthanded.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_controls3.weaponpitch.generic.type = MTYPE_SLIDER;
s_controls3.weaponpitch.generic.x = VR_X_POS;
s_controls3.weaponpitch.generic.y = y;
s_controls3.weaponpitch.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.weaponpitch.generic.name = "Weapon Pitch:";
s_controls3.weaponpitch.generic.id = ID_WEAPONPITCH;
s_controls3.weaponpitch.generic.callback = Controls3_MenuEvent;
s_controls3.weaponpitch.minvalue = 0;
s_controls3.weaponpitch.maxvalue = 30;
y += BIGCHAR_HEIGHT+2;
s_controls3.altkey.generic.type = MTYPE_RADIOBUTTON;
s_controls3.altkey.generic.x = VR_X_POS;
s_controls3.altkey.generic.y = y;
s_controls3.altkey.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_controls3.altkey.generic.name = "ALT Layout Trigger:";
s_controls3.altkey.generic.id = ID_ALTKEY;
s_controls3.altkey.generic.callback = Controls3_MenuEvent;
s_controls3.back.generic.type = MTYPE_BITMAP;
s_controls3.back.generic.name = ART_BACK0;
s_controls3.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
s_controls3.back.generic.callback = Controls3_MenuEvent;
s_controls3.back.generic.id = ID_BACK;
s_controls3.back.generic.x = 0;
s_controls3.back.generic.y = 480-64;
s_controls3.back.width = 128;
s_controls3.back.height = 64;
s_controls3.back.focuspic = ART_BACK1;
Menu_AddItem( &s_controls3.menu, &s_controls3.banner );
Menu_AddItem( &s_controls3.menu, &s_controls3.framel );
Menu_AddItem( &s_controls3.menu, &s_controls3.framer );
Menu_AddItem( &s_controls3.menu, &s_controls3.autoswitch );
Menu_AddItem( &s_controls3.menu, &s_controls3.scope );
Menu_AddItem( &s_controls3.menu, &s_controls3.twohanded );
Menu_AddItem( &s_controls3.menu, &s_controls3.directionmode );
Menu_AddItem( &s_controls3.menu, &s_controls3.righthanded );
Menu_AddItem( &s_controls3.menu, &s_controls3.weaponpitch );
Menu_AddItem( &s_controls3.menu, &s_controls3.altkey );
Menu_AddItem( &s_controls3.menu, &s_controls3.back );
Controls3_SetMenuItems();
}
/*
===============
Controls3_Cache
===============
*/
void Controls3_Cache( void ) {
trap_R_RegisterShaderNoMip( ART_FRAMEL );
trap_R_RegisterShaderNoMip( ART_FRAMER );
trap_R_RegisterShaderNoMip( ART_BACK0 );
trap_R_RegisterShaderNoMip( ART_BACK1 );
}
/*
===============
UI_Controls3Menu
===============
*/
void UI_Controls3Menu( void ) {
Controls3_MenuInit();
UI_PushMenu( &s_controls3.menu );
}

View file

@ -411,6 +411,18 @@ extern void Preferences_Cache( void );
extern void UI_VRMenu( void );
extern void VR_Cache( void );
//
// ui_controls3.c
//
extern void UI_Controls3Menu( void );
extern void Controls3_Cache( void );
//
// ui_comfort.c
//
extern void UI_ComfortMenu( void );
extern void Comfort_Cache( void );
//
// ui_specifyleague.c
//

View file

@ -191,7 +191,7 @@ static cvarTable_t cvarTable[] = {
{ &ui_spSelection, "ui_spSelection", "", CVAR_ROM },
{ &ui_browserMaster, "ui_browserMaster", "1", CVAR_ARCHIVE },
{ &ui_browserMaster, "ui_browserMaster", "2", CVAR_ARCHIVE },
{ &ui_browserGameType, "ui_browserGameType", "0", CVAR_ARCHIVE },
{ &ui_browserSortKey, "ui_browserSortKey", "4", CVAR_ARCHIVE },
{ &ui_browserShowFull, "ui_browserShowFull", "1", CVAR_ARCHIVE },

View file

@ -41,7 +41,9 @@ NETWORK OPTIONS MENU
#define ID_SOUND 12
#define ID_NETWORK 13
#define ID_RATE 14
#define ID_BACK 15
#define ID_ALLOWDOWNLOAD 15
#define ID_SENDROLL 16
#define ID_BACK 17
static const char *rate_items[] = {
@ -66,6 +68,8 @@ typedef struct {
menutext_s network;
menulist_s rate;
menuradiobutton_s allowdownload;
menuradiobutton_s sendroll;
menubitmap_s back;
} networkOptionsInfo_t;
@ -89,10 +93,10 @@ static void UI_NetworkOptionsMenu_Event( void* ptr, int event ) {
UI_GraphicsOptionsMenu();
break;
case ID_DISPLAY:
UI_PopMenu();
UI_DisplayOptionsMenu();
break;
// case ID_DISPLAY:
// UI_PopMenu();
// UI_DisplayOptionsMenu();
// break;
case ID_SOUND:
UI_PopMenu();
@ -120,6 +124,15 @@ static void UI_NetworkOptionsMenu_Event( void* ptr, int event ) {
}
break;
case ID_ALLOWDOWNLOAD:
trap_Cvar_SetValue( "cl_allowDownload", networkOptionsInfo.allowdownload.curvalue );
trap_Cvar_SetValue( "sv_allowDownload", networkOptionsInfo.allowdownload.curvalue );
break;
case ID_SENDROLL:
trap_Cvar_SetValue( "vr_sendRollToServer", networkOptionsInfo.sendroll.curvalue);
break;
case ID_BACK:
UI_PopMenu();
break;
@ -171,27 +184,27 @@ static void UI_NetworkOptionsMenu_Init( void ) {
networkOptionsInfo.graphics.generic.id = ID_GRAPHICS;
networkOptionsInfo.graphics.generic.callback = UI_NetworkOptionsMenu_Event;
networkOptionsInfo.graphics.generic.x = 216;
networkOptionsInfo.graphics.generic.y = 240 - 2 * PROP_HEIGHT;
networkOptionsInfo.graphics.generic.y = 256 - 2 * PROP_HEIGHT;
networkOptionsInfo.graphics.string = "GRAPHICS";
networkOptionsInfo.graphics.style = UI_RIGHT;
networkOptionsInfo.graphics.color = color_red;
networkOptionsInfo.display.generic.type = MTYPE_PTEXT;
networkOptionsInfo.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
networkOptionsInfo.display.generic.id = ID_DISPLAY;
networkOptionsInfo.display.generic.callback = UI_NetworkOptionsMenu_Event;
networkOptionsInfo.display.generic.x = 216;
networkOptionsInfo.display.generic.y = 240 - PROP_HEIGHT;
networkOptionsInfo.display.string = "DISPLAY";
networkOptionsInfo.display.style = UI_RIGHT;
networkOptionsInfo.display.color = color_red;
// networkOptionsInfo.display.generic.type = MTYPE_PTEXT;
// networkOptionsInfo.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
// networkOptionsInfo.display.generic.id = ID_DISPLAY;
// networkOptionsInfo.display.generic.callback = UI_NetworkOptionsMenu_Event;
// networkOptionsInfo.display.generic.x = 216;
// networkOptionsInfo.display.generic.y = 240 - PROP_HEIGHT;
// networkOptionsInfo.display.string = "DISPLAY";
// networkOptionsInfo.display.style = UI_RIGHT;
// networkOptionsInfo.display.color = color_red;
networkOptionsInfo.sound.generic.type = MTYPE_PTEXT;
networkOptionsInfo.sound.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
networkOptionsInfo.sound.generic.id = ID_SOUND;
networkOptionsInfo.sound.generic.callback = UI_NetworkOptionsMenu_Event;
networkOptionsInfo.sound.generic.x = 216;
networkOptionsInfo.sound.generic.y = 240;
networkOptionsInfo.sound.generic.y = 256 - PROP_HEIGHT;
networkOptionsInfo.sound.string = "SOUND";
networkOptionsInfo.sound.style = UI_RIGHT;
networkOptionsInfo.sound.color = color_red;
@ -201,12 +214,12 @@ static void UI_NetworkOptionsMenu_Init( void ) {
networkOptionsInfo.network.generic.id = ID_NETWORK;
networkOptionsInfo.network.generic.callback = UI_NetworkOptionsMenu_Event;
networkOptionsInfo.network.generic.x = 216;
networkOptionsInfo.network.generic.y = 240 + PROP_HEIGHT;
networkOptionsInfo.network.generic.y = 256;
networkOptionsInfo.network.string = "NETWORK";
networkOptionsInfo.network.style = UI_RIGHT;
networkOptionsInfo.network.color = color_red;
y = 240 - 1 * (BIGCHAR_HEIGHT+2);
y = 256 - 2 * (BIGCHAR_HEIGHT + 2);
networkOptionsInfo.rate.generic.type = MTYPE_SPINCONTROL;
networkOptionsInfo.rate.generic.name = "Data Rate:";
networkOptionsInfo.rate.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
@ -216,6 +229,24 @@ static void UI_NetworkOptionsMenu_Init( void ) {
networkOptionsInfo.rate.generic.y = y;
networkOptionsInfo.rate.itemnames = rate_items;
y += BIGCHAR_HEIGHT+2;
networkOptionsInfo.allowdownload.generic.type = MTYPE_RADIOBUTTON;
networkOptionsInfo.allowdownload.generic.name = "Auto-Download:";
networkOptionsInfo.allowdownload.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
networkOptionsInfo.allowdownload.generic.callback = UI_NetworkOptionsMenu_Event;
networkOptionsInfo.allowdownload.generic.id = ID_ALLOWDOWNLOAD;
networkOptionsInfo.allowdownload.generic.x = 400;
networkOptionsInfo.allowdownload.generic.y = y;
y += BIGCHAR_HEIGHT+2;
networkOptionsInfo.sendroll.generic.type = MTYPE_RADIOBUTTON;
networkOptionsInfo.sendroll.generic.name = "Send Roll Angle:";
networkOptionsInfo.sendroll.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
networkOptionsInfo.sendroll.generic.callback = UI_NetworkOptionsMenu_Event;
networkOptionsInfo.sendroll.generic.id = ID_SENDROLL;
networkOptionsInfo.sendroll.generic.x = 400;
networkOptionsInfo.sendroll.generic.y = y;
networkOptionsInfo.back.generic.type = MTYPE_BITMAP;
networkOptionsInfo.back.generic.name = ART_BACK0;
networkOptionsInfo.back.generic.flags = QMF_LEFT_JUSTIFY|QMF_PULSEIFFOCUS;
@ -231,10 +262,12 @@ static void UI_NetworkOptionsMenu_Init( void ) {
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.framel );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.framer );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.graphics );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.display );
// Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.display );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.sound );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.network );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.rate );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.allowdownload );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.sendroll );
Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.back );
rate = trap_Cvar_VariableValue( "rate" );
@ -253,6 +286,8 @@ static void UI_NetworkOptionsMenu_Init( void ) {
else {
networkOptionsInfo.rate.curvalue = 4;
}
networkOptionsInfo.allowdownload.curvalue = trap_Cvar_VariableValue( "cl_allowDownload" ) != 0;
networkOptionsInfo.sendroll.curvalue = trap_Cvar_VariableValue( "vr_sendRollToServer" ) != 0;
}

View file

@ -75,9 +75,9 @@ static void Options_Event( void* ptr, int event ) {
UI_GraphicsOptionsMenu();
break;
case ID_DISPLAY:
UI_DisplayOptionsMenu();
break;
// case ID_DISPLAY:
// UI_DisplayOptionsMenu();
// break;
case ID_SOUND:
UI_SoundOptionsMenu();
@ -152,7 +152,7 @@ void Options_MenuInit( void ) {
s_options.framer.width = 256;
s_options.framer.height = 334;
y = 168;
y = 134;
s_options.graphics.generic.type = MTYPE_PTEXT;
s_options.graphics.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_options.graphics.generic.callback = Options_Event;
@ -163,16 +163,16 @@ void Options_MenuInit( void ) {
s_options.graphics.color = color_red;
s_options.graphics.style = UI_CENTER;
y += VERTICAL_SPACING;
s_options.display.generic.type = MTYPE_PTEXT;
s_options.display.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
s_options.display.generic.callback = Options_Event;
s_options.display.generic.id = ID_DISPLAY;
s_options.display.generic.x = 320;
s_options.display.generic.y = y;
s_options.display.string = "DISPLAY";
s_options.display.color = color_red;
s_options.display.style = UI_CENTER;
// y += VERTICAL_SPACING;
// s_options.display.generic.type = MTYPE_PTEXT;
// s_options.display.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
// s_options.display.generic.callback = Options_Event;
// s_options.display.generic.id = ID_DISPLAY;
// s_options.display.generic.x = 320;
// s_options.display.generic.y = y;
// s_options.display.string = "DISPLAY";
// s_options.display.color = color_red;
// s_options.display.style = UI_CENTER;
y += VERTICAL_SPACING;
s_options.sound.generic.type = MTYPE_PTEXT;

View file

@ -40,8 +40,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define ID_NAME 10
#define ID_HANDICAP 11
#define ID_EFFECTS 12
#define ID_BACK 13
#define ID_MODEL 14
#define ID_BODYSCALE 13
#define ID_BACK 14
#define ID_MODEL 15
#define MAX_NAMELENGTH 20
@ -57,6 +58,7 @@ typedef struct {
menufield_s name;
menulist_s handicap;
menulist_s effects;
menuslider_s bodyscale;
menubitmap_s back;
menubitmap_s model;
@ -265,6 +267,9 @@ static void PlayerSettings_SaveChanges( void ) {
// effects color
trap_Cvar_SetValue( "color1", uitogamecode[s_playersettings.effects.curvalue] );
// body scale
trap_Cvar_SetValue( "cg_firstPersonBodyScale", s_playersettings.bodyscale.curvalue);
}
@ -314,6 +319,9 @@ static void PlayerSettings_SetMenuItems( void ) {
// handicap
h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") );
s_playersettings.handicap.curvalue = 20 - h / 5;
// body scale
s_playersettings.bodyscale.curvalue = trap_Cvar_VariableValue( "cg_firstPersonBodyScale" );
}
@ -337,6 +345,10 @@ static void PlayerSettings_MenuEvent( void* ptr, int event ) {
UI_PlayerModelMenu();
break;
case ID_BODYSCALE:
trap_Cvar_SetValue( "cg_firstPersonBodyScale", s_playersettings.bodyscale.curvalue);
break;
case ID_BACK:
PlayerSettings_SaveChanges();
UI_PopMenu();
@ -384,7 +396,7 @@ static void PlayerSettings_MenuInit( void ) {
s_playersettings.framer.width = 256;
s_playersettings.framer.height = 334;
y = 144;
y = 112;
s_playersettings.name.generic.type = MTYPE_FIELD;
s_playersettings.name.generic.flags = QMF_NODEFAULTINIT;
s_playersettings.name.generic.ownerdraw = PlayerSettings_DrawName;
@ -423,6 +435,17 @@ static void PlayerSettings_MenuInit( void ) {
s_playersettings.effects.generic.bottom = y + 2* PROP_HEIGHT;
s_playersettings.effects.numitems = 7;
y += 3 * PROP_HEIGHT;
s_playersettings.bodyscale.generic.type = MTYPE_SLIDER;
s_playersettings.bodyscale.generic.name = "1ST-PERSON BODY SCALE:";
s_playersettings.bodyscale.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_playersettings.bodyscale.generic.callback = PlayerSettings_MenuEvent;
s_playersettings.bodyscale.generic.id = ID_BODYSCALE;
s_playersettings.bodyscale.generic.x = 360;
s_playersettings.bodyscale.generic.y = y;
s_playersettings.bodyscale.minvalue = 0.0f;
s_playersettings.bodyscale.maxvalue = 1.0f;
s_playersettings.model.generic.type = MTYPE_BITMAP;
s_playersettings.model.generic.name = ART_MODEL0;
s_playersettings.model.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
@ -467,6 +490,7 @@ static void PlayerSettings_MenuInit( void ) {
Menu_AddItem( &s_playersettings.menu, &s_playersettings.name );
Menu_AddItem( &s_playersettings.menu, &s_playersettings.handicap );
Menu_AddItem( &s_playersettings.menu, &s_playersettings.effects );
Menu_AddItem( &s_playersettings.menu, &s_playersettings.bodyscale );
Menu_AddItem( &s_playersettings.menu, &s_playersettings.model );
Menu_AddItem( &s_playersettings.menu, &s_playersettings.back );

View file

@ -49,10 +49,15 @@ GAME OPTIONS MENU
#define ID_SYNCEVERYFRAME 134
#define ID_FORCEMODEL 135
#define ID_DRAWTEAMOVERLAY 136
#define ID_ALLOWDOWNLOAD 137
#define ID_BACK 138
#define ID_ALLOWDOWNLOAD 137
#define ID_LASERSIGHT 138
#define ID_DRAWHUD 139
#define ID_HOLSTER2D 140
#define ID_GORE 141
#define ID_BACK 142
#define NUM_CROSSHAIRS 10
#define NUM_GORE 4
typedef struct {
@ -63,6 +68,7 @@ typedef struct {
menubitmap_s framer;
menulist_s crosshair;
menuradiobutton_s lasersight;
menuradiobutton_s simpleitems;
menuradiobutton_s brass;
menuradiobutton_s wallmarks;
@ -72,7 +78,10 @@ typedef struct {
menuradiobutton_s synceveryframe;
menuradiobutton_s forcemodel;
menulist_s drawteamoverlay;
menuradiobutton_s drawhud;
menuradiobutton_s allowdownload;
menuradiobutton_s holster2d;
menulist_s gore;
menubitmap_s back;
qhandle_t crosshairShader[NUM_CROSSHAIRS];
@ -89,18 +98,38 @@ static const char *teamoverlay_names[] =
NULL
};
static const char *s_gore[] =
{
"None",
"Blood Only",
"Blood & Gibs (Default)",
"Extra Gore (Performance Hit)",
NULL
};
static void Preferences_SetMenuItems( void ) {
s_preferences.crosshair.curvalue = (int)trap_Cvar_VariableValue( "cg_drawCrosshair" ) % NUM_CROSSHAIRS;
s_preferences.lasersight.curvalue = trap_Cvar_VariableValue( "vr_lasersight" ) != 0;
s_preferences.simpleitems.curvalue = trap_Cvar_VariableValue( "cg_simpleItems" ) != 0;
s_preferences.brass.curvalue = trap_Cvar_VariableValue( "cg_brassTime" ) != 0;
s_preferences.wallmarks.curvalue = trap_Cvar_VariableValue( "cg_marks" ) != 0;
s_preferences.identifytarget.curvalue = trap_Cvar_VariableValue( "cg_drawCrosshairNames" ) != 0;
s_preferences.dynamiclights.curvalue = trap_Cvar_VariableValue( "r_dynamiclight" ) != 0;
// s_preferences.dynamiclights.curvalue = trap_Cvar_VariableValue( "r_dynamiclight" ) != 0;
s_preferences.highqualitysky.curvalue = trap_Cvar_VariableValue ( "r_fastsky" ) == 0;
s_preferences.synceveryframe.curvalue = trap_Cvar_VariableValue( "r_finish" ) != 0;
// s_preferences.synceveryframe.curvalue = trap_Cvar_VariableValue( "r_finish" ) != 0;
s_preferences.forcemodel.curvalue = trap_Cvar_VariableValue( "cg_forcemodel" ) != 0;
s_preferences.drawteamoverlay.curvalue = Com_Clamp( 0, 3, trap_Cvar_VariableValue( "cg_drawTeamOverlay" ) );
s_preferences.allowdownload.curvalue = trap_Cvar_VariableValue( "cl_allowDownload" ) != 0;
s_preferences.drawhud.curvalue = trap_Cvar_VariableValue( "cg_drawStatus" ) != 0;
// s_preferences.allowdownload.curvalue = trap_Cvar_VariableValue( "cl_allowDownload" ) != 0;
s_preferences.holster2d.curvalue = trap_Cvar_VariableValue( "cg_holsterSimple2DIcons" ) != 0;
//GORE
{
int level = trap_Cvar_VariableValue( "com_blood" ) +
trap_Cvar_VariableValue( "cg_gibs" ) +
trap_Cvar_VariableValue( "cg_megagibs" );
s_preferences.gore.curvalue = level % NUM_GORE;
}
}
@ -158,6 +187,44 @@ static void Preferences_Event( void* ptr, int notification ) {
trap_Cvar_SetValue( "sv_allowDownload", s_preferences.allowdownload.curvalue );
break;
case ID_LASERSIGHT:
trap_Cvar_SetValue( "vr_lasersight", s_preferences.lasersight.curvalue);
break;
case ID_DRAWHUD:
trap_Cvar_SetValue( "cg_drawStatus", s_preferences.drawhud.curvalue );
break;
case ID_HOLSTER2D:
trap_Cvar_SetValue( "cg_holsterSimple2DIcons", s_preferences.holster2d.curvalue);
break;
case ID_GORE: {
switch ((int)s_preferences.gore.curvalue) {
case 0:
trap_Cvar_SetValue( "com_blood", 0);
trap_Cvar_SetValue( "cg_gibs", 0);
trap_Cvar_SetValue( "cg_megagibs", 0);
break;
case 1:
trap_Cvar_SetValue( "com_blood", 1);
trap_Cvar_SetValue( "cg_gibs", 0);
trap_Cvar_SetValue( "cg_megagibs", 0);
break;
case 2:
trap_Cvar_SetValue( "com_blood", 1);
trap_Cvar_SetValue( "cg_gibs", 1);
trap_Cvar_SetValue( "cg_megagibs", 0);
break;
case 3:
trap_Cvar_SetValue( "com_blood", 1);
trap_Cvar_SetValue( "cg_gibs", 1);
trap_Cvar_SetValue( "cg_megagibs", 1);
break;
}
}
break;
case ID_BACK:
UI_PopMenu();
break;
@ -247,7 +314,7 @@ static void Preferences_MenuInit( void ) {
s_preferences.framer.width = 256;
s_preferences.framer.height = 334;
y = 144;
y = 110;
s_preferences.crosshair.generic.type = MTYPE_SPINCONTROL;
s_preferences.crosshair.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT|QMF_NODEFAULTINIT|QMF_OWNERDRAW;
s_preferences.crosshair.generic.x = PREFERENCES_X_POS;
@ -263,15 +330,33 @@ static void Preferences_MenuInit( void ) {
s_preferences.crosshair.numitems = NUM_CROSSHAIRS;
y += BIGCHAR_HEIGHT+2+4;
s_preferences.lasersight.generic.type = MTYPE_RADIOBUTTON;
s_preferences.lasersight.generic.name = "Laser Sight:";
s_preferences.lasersight.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.lasersight.generic.callback = Preferences_Event;
s_preferences.lasersight.generic.id = ID_LASERSIGHT;
s_preferences.lasersight.generic.x = PREFERENCES_X_POS;
s_preferences.lasersight.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.simpleitems.generic.type = MTYPE_RADIOBUTTON;
s_preferences.simpleitems.generic.name = "Simple Items:";
s_preferences.simpleitems.generic.name = "Simple Items (World):";
s_preferences.simpleitems.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.simpleitems.generic.callback = Preferences_Event;
s_preferences.simpleitems.generic.id = ID_SIMPLEITEMS;
s_preferences.simpleitems.generic.x = PREFERENCES_X_POS;
s_preferences.simpleitems.generic.y = y;
y += BIGCHAR_HEIGHT;
y += BIGCHAR_HEIGHT+2;
s_preferences.holster2d.generic.type = MTYPE_RADIOBUTTON;
s_preferences.holster2d.generic.name = "Simple Items (Holster):";
s_preferences.holster2d.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.holster2d.generic.callback = Preferences_Event;
s_preferences.holster2d.generic.id = ID_HOLSTER2D;
s_preferences.holster2d.generic.x = PREFERENCES_X_POS;
s_preferences.holster2d.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.wallmarks.generic.type = MTYPE_RADIOBUTTON;
s_preferences.wallmarks.generic.name = "Marks on Walls:";
s_preferences.wallmarks.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
@ -289,14 +374,14 @@ static void Preferences_MenuInit( void ) {
s_preferences.brass.generic.x = PREFERENCES_X_POS;
s_preferences.brass.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.dynamiclights.generic.type = MTYPE_RADIOBUTTON;
s_preferences.dynamiclights.generic.name = "Dynamic Lights:";
s_preferences.dynamiclights.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.dynamiclights.generic.callback = Preferences_Event;
s_preferences.dynamiclights.generic.id = ID_DYNAMICLIGHTS;
s_preferences.dynamiclights.generic.x = PREFERENCES_X_POS;
s_preferences.dynamiclights.generic.y = y;
// y += BIGCHAR_HEIGHT+2;
// s_preferences.dynamiclights.generic.type = MTYPE_RADIOBUTTON;
// s_preferences.dynamiclights.generic.name = "Dynamic Lights:";
// s_preferences.dynamiclights.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_preferences.dynamiclights.generic.callback = Preferences_Event;
// s_preferences.dynamiclights.generic.id = ID_DYNAMICLIGHTS;
// s_preferences.dynamiclights.generic.x = PREFERENCES_X_POS;
// s_preferences.dynamiclights.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.identifytarget.generic.type = MTYPE_RADIOBUTTON;
@ -316,14 +401,14 @@ static void Preferences_MenuInit( void ) {
s_preferences.highqualitysky.generic.x = PREFERENCES_X_POS;
s_preferences.highqualitysky.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.synceveryframe.generic.type = MTYPE_RADIOBUTTON;
s_preferences.synceveryframe.generic.name = "Sync Every Frame:";
s_preferences.synceveryframe.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.synceveryframe.generic.callback = Preferences_Event;
s_preferences.synceveryframe.generic.id = ID_SYNCEVERYFRAME;
s_preferences.synceveryframe.generic.x = PREFERENCES_X_POS;
s_preferences.synceveryframe.generic.y = y;
// y += BIGCHAR_HEIGHT+2;
// s_preferences.synceveryframe.generic.type = MTYPE_RADIOBUTTON;
// s_preferences.synceveryframe.generic.name = "Sync Every Frame:";
// s_preferences.synceveryframe.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_preferences.synceveryframe.generic.callback = Preferences_Event;
// s_preferences.synceveryframe.generic.id = ID_SYNCEVERYFRAME;
// s_preferences.synceveryframe.generic.x = PREFERENCES_X_POS;
// s_preferences.synceveryframe.generic.y = y;
y += BIGCHAR_HEIGHT+2;
s_preferences.forcemodel.generic.type = MTYPE_RADIOBUTTON;
@ -345,13 +430,33 @@ static void Preferences_MenuInit( void ) {
s_preferences.drawteamoverlay.itemnames = teamoverlay_names;
y += BIGCHAR_HEIGHT+2;
s_preferences.allowdownload.generic.type = MTYPE_RADIOBUTTON;
s_preferences.allowdownload.generic.name = "Automatic Downloading:";
s_preferences.allowdownload.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.allowdownload.generic.callback = Preferences_Event;
s_preferences.allowdownload.generic.id = ID_ALLOWDOWNLOAD;
s_preferences.allowdownload.generic.x = PREFERENCES_X_POS;
s_preferences.allowdownload.generic.y = y;
s_preferences.drawhud.generic.type = MTYPE_RADIOBUTTON;
s_preferences.drawhud.generic.name = "Draw HUD:";
s_preferences.drawhud.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.drawhud.generic.callback = Preferences_Event;
s_preferences.drawhud.generic.id = ID_DRAWHUD;
s_preferences.drawhud.generic.x = PREFERENCES_X_POS;
s_preferences.drawhud.generic.y = y;
// y += BIGCHAR_HEIGHT+2;
// s_preferences.allowdownload.generic.type = MTYPE_RADIOBUTTON;
// s_preferences.allowdownload.generic.name = "Automatic Downloading:";
// s_preferences.allowdownload.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_preferences.allowdownload.generic.callback = Preferences_Event;
// s_preferences.allowdownload.generic.id = ID_ALLOWDOWNLOAD;
// s_preferences.allowdownload.generic.x = PREFERENCES_X_POS;
// s_preferences.allowdownload.generic.y = y;
y += BIGCHAR_HEIGHT+16;
s_preferences.gore.generic.type = MTYPE_SPINCONTROL;
s_preferences.gore.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_preferences.gore.generic.x = PREFERENCES_X_POS - 120;
s_preferences.gore.generic.y = y;
s_preferences.gore.generic.name = "Gore:";
s_preferences.gore.generic.callback = Preferences_Event;
s_preferences.gore.generic.id = ID_GORE;
s_preferences.gore.itemnames = s_gore;
s_preferences.gore.numitems = NUM_GORE;
s_preferences.back.generic.type = MTYPE_BITMAP;
s_preferences.back.generic.name = ART_BACK0;
@ -369,16 +474,20 @@ static void Preferences_MenuInit( void ) {
Menu_AddItem( &s_preferences.menu, &s_preferences.framer );
Menu_AddItem( &s_preferences.menu, &s_preferences.crosshair );
Menu_AddItem( &s_preferences.menu, &s_preferences.lasersight );
Menu_AddItem( &s_preferences.menu, &s_preferences.simpleitems );
Menu_AddItem( &s_preferences.menu, &s_preferences.wallmarks );
Menu_AddItem( &s_preferences.menu, &s_preferences.brass );
Menu_AddItem( &s_preferences.menu, &s_preferences.dynamiclights );
// Menu_AddItem( &s_preferences.menu, &s_preferences.dynamiclights );
Menu_AddItem( &s_preferences.menu, &s_preferences.identifytarget );
Menu_AddItem( &s_preferences.menu, &s_preferences.highqualitysky );
Menu_AddItem( &s_preferences.menu, &s_preferences.synceveryframe );
// Menu_AddItem( &s_preferences.menu, &s_preferences.synceveryframe );
Menu_AddItem( &s_preferences.menu, &s_preferences.forcemodel );
Menu_AddItem( &s_preferences.menu, &s_preferences.drawteamoverlay );
Menu_AddItem( &s_preferences.menu, &s_preferences.allowdownload );
Menu_AddItem( &s_preferences.menu, &s_preferences.drawhud );
Menu_AddItem( &s_preferences.menu, &s_preferences.holster2d );
// Menu_AddItem( &s_preferences.menu, &s_preferences.allowdownload );
Menu_AddItem( &s_preferences.menu, &s_preferences.gore );
Menu_AddItem( &s_preferences.menu, &s_preferences.back );

View file

@ -41,14 +41,15 @@ SETUP MENU
#define ID_CUSTOMIZEPLAYER 10
#define ID_CUSTOMIZECONTROLS 11
#define ID_SYSTEMCONFIG 12
#define ID_COMFORT 12
#define ID_GAME 13
#define ID_VR 14
#define ID_CDKEY 15
#define ID_LOAD 16
#define ID_SAVE 17
#define ID_DEFAULTS 18
#define ID_BACK 19
#define ID_SYSTEMCONFIG 14
#define ID_VR 15
#define ID_CDKEY 16
#define ID_LOAD 17
#define ID_SAVE 18
#define ID_DEFAULTS 19
#define ID_BACK 20
typedef struct {
@ -59,10 +60,11 @@ typedef struct {
menubitmap_s framer;
menutext_s setupplayer;
menutext_s setupcontrols;
menutext_s setupsystem;
menutext_s comfort;
menutext_s game;
menutext_s vr;
menutext_s cdkey;
menutext_s setupsystem;
// menutext_s vr;
// menutext_s cdkey;
// menutext_s load;
// menutext_s save;
menutext_s defaults;
@ -114,24 +116,28 @@ static void UI_SetupMenu_Event( void *ptr, int event ) {
break;
case ID_CUSTOMIZECONTROLS:
UI_ControlsMenu();
UI_Controls3Menu();
break;
case ID_SYSTEMCONFIG:
UI_GraphicsOptionsMenu();
case ID_COMFORT:
UI_ComfortMenu();
break;
case ID_GAME:
UI_PreferencesMenu();
break;
case ID_VR:
UI_VRMenu();
case ID_SYSTEMCONFIG:
UI_GraphicsOptionsMenu();
break;
case ID_CDKEY:
UI_CDKeyMenu();
break;
// case ID_VR:
// UI_VRMenu();
// break;
// case ID_CDKEY:
// UI_CDKeyMenu();
// break;
// case ID_LOAD:
// UI_LoadConfigMenu();
@ -200,17 +206,39 @@ static void UI_SetupMenu_Init( void ) {
setupMenuInfo.setupplayer.color = color_red;
setupMenuInfo.setupplayer.style = UI_CENTER;
/* y += SETUP_MENU_VERTICAL_SPACING;
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.setupcontrols.generic.type = MTYPE_PTEXT;
setupMenuInfo.setupcontrols.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
setupMenuInfo.setupcontrols.generic.x = 320;
setupMenuInfo.setupcontrols.generic.y = y;
setupMenuInfo.setupcontrols.generic.id = ID_CUSTOMIZECONTROLS;
setupMenuInfo.setupcontrols.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.setupcontrols.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.setupcontrols.string = "CONTROLS";
setupMenuInfo.setupcontrols.color = color_red;
setupMenuInfo.setupcontrols.style = UI_CENTER;
*/
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.comfort.generic.type = MTYPE_PTEXT;
setupMenuInfo.comfort.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
setupMenuInfo.comfort.generic.x = 320;
setupMenuInfo.comfort.generic.y = y;
setupMenuInfo.comfort.generic.id = ID_COMFORT;
setupMenuInfo.comfort.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.comfort.string = "COMFORT OPTIONS";
setupMenuInfo.comfort.color = color_red;
setupMenuInfo.comfort.style = UI_CENTER;
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.game.generic.type = MTYPE_PTEXT;
setupMenuInfo.game.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
setupMenuInfo.game.generic.x = 320;
setupMenuInfo.game.generic.y = y;
setupMenuInfo.game.generic.id = ID_GAME;
setupMenuInfo.game.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.game.string = "GAME OPTIONS";
setupMenuInfo.game.color = color_red;
setupMenuInfo.game.style = UI_CENTER;
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.setupsystem.generic.type = MTYPE_PTEXT;
setupMenuInfo.setupsystem.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
@ -222,38 +250,27 @@ static void UI_SetupMenu_Init( void ) {
setupMenuInfo.setupsystem.color = color_red;
setupMenuInfo.setupsystem.style = UI_CENTER;
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.game.generic.type = MTYPE_PTEXT;
setupMenuInfo.game.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
setupMenuInfo.game.generic.x = 320;
setupMenuInfo.game.generic.y = y;
setupMenuInfo.game.generic.id = ID_GAME;
setupMenuInfo.game.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.game.string = "GAME OPTIONS";
setupMenuInfo.game.color = color_red;
setupMenuInfo.game.style = UI_CENTER;
// y += SETUP_MENU_VERTICAL_SPACING;
// setupMenuInfo.vr.generic.type = MTYPE_PTEXT;
// setupMenuInfo.vr.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
// setupMenuInfo.vr.generic.x = 320;
// setupMenuInfo.vr.generic.y = y;
// setupMenuInfo.vr.generic.id = ID_VR;
// setupMenuInfo.vr.generic.callback = UI_SetupMenu_Event;
// setupMenuInfo.vr.string = "VR OPTIONS";
// setupMenuInfo.vr.color = color_red;
// setupMenuInfo.vr.style = UI_CENTER;
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.vr.generic.type = MTYPE_PTEXT;
setupMenuInfo.vr.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
setupMenuInfo.vr.generic.x = 320;
setupMenuInfo.vr.generic.y = y;
setupMenuInfo.vr.generic.id = ID_VR;
setupMenuInfo.vr.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.vr.string = "VR OPTIONS";
setupMenuInfo.vr.color = color_red;
setupMenuInfo.vr.style = UI_CENTER;
y += SETUP_MENU_VERTICAL_SPACING;
setupMenuInfo.cdkey.generic.type = MTYPE_PTEXT;
setupMenuInfo.cdkey.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
setupMenuInfo.cdkey.generic.x = 320;
setupMenuInfo.cdkey.generic.y = y;
setupMenuInfo.cdkey.generic.id = ID_CDKEY;
setupMenuInfo.cdkey.generic.callback = UI_SetupMenu_Event;
setupMenuInfo.cdkey.string = "CD Key";
setupMenuInfo.cdkey.color = color_red;
setupMenuInfo.cdkey.style = UI_CENTER;
// y += SETUP_MENU_VERTICAL_SPACING;
// setupMenuInfo.cdkey.generic.type = MTYPE_PTEXT;
// setupMenuInfo.cdkey.generic.flags = QMF_CENTER_JUSTIFY|QMF_PULSEIFFOCUS;
// setupMenuInfo.cdkey.generic.x = 320;
// setupMenuInfo.cdkey.generic.y = y;
// setupMenuInfo.cdkey.generic.id = ID_CDKEY;
// setupMenuInfo.cdkey.generic.callback = UI_SetupMenu_Event;
// setupMenuInfo.cdkey.string = "CD Key";
// setupMenuInfo.cdkey.color = color_red;
// setupMenuInfo.cdkey.style = UI_CENTER;
if( !trap_Cvar_VariableValue( "cl_paused" ) ) {
#if 0
@ -307,11 +324,12 @@ static void UI_SetupMenu_Init( void ) {
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.framel );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.framer );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.setupplayer );
// Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.setupcontrols );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.setupsystem );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.setupcontrols );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.comfort );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.game );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.vr );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.cdkey );
Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.setupsystem );
// Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.vr );
// Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.cdkey );
// Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.load );
// Menu_AddItem( &setupMenuInfo.menu, &setupMenuInfo.save );
if( !trap_Cvar_VariableValue( "cl_paused" ) ) {

View file

@ -109,10 +109,10 @@ static void UI_SoundOptionsMenu_Event( void* ptr, int event ) {
UI_GraphicsOptionsMenu();
break;
case ID_DISPLAY:
UI_PopMenu();
UI_DisplayOptionsMenu();
break;
// case ID_DISPLAY:
// UI_PopMenu();
// UI_DisplayOptionsMenu();
// break;
case ID_SOUND:
break;
@ -273,27 +273,27 @@ static void UI_SoundOptionsMenu_Init( void ) {
soundOptionsInfo.graphics.generic.id = ID_GRAPHICS;
soundOptionsInfo.graphics.generic.callback = UI_SoundOptionsMenu_Event;
soundOptionsInfo.graphics.generic.x = 216;
soundOptionsInfo.graphics.generic.y = 240 - 2 * PROP_HEIGHT;
soundOptionsInfo.graphics.generic.y = 256 - 2 * PROP_HEIGHT;
soundOptionsInfo.graphics.string = "GRAPHICS";
soundOptionsInfo.graphics.style = UI_RIGHT;
soundOptionsInfo.graphics.color = color_red;
soundOptionsInfo.display.generic.type = MTYPE_PTEXT;
soundOptionsInfo.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
soundOptionsInfo.display.generic.id = ID_DISPLAY;
soundOptionsInfo.display.generic.callback = UI_SoundOptionsMenu_Event;
soundOptionsInfo.display.generic.x = 216;
soundOptionsInfo.display.generic.y = 240 - PROP_HEIGHT;
soundOptionsInfo.display.string = "DISPLAY";
soundOptionsInfo.display.style = UI_RIGHT;
soundOptionsInfo.display.color = color_red;
// soundOptionsInfo.display.generic.type = MTYPE_PTEXT;
// soundOptionsInfo.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
// soundOptionsInfo.display.generic.id = ID_DISPLAY;
// soundOptionsInfo.display.generic.callback = UI_SoundOptionsMenu_Event;
// soundOptionsInfo.display.generic.x = 216;
// soundOptionsInfo.display.generic.y = 240 - PROP_HEIGHT;
// soundOptionsInfo.display.string = "DISPLAY";
// soundOptionsInfo.display.style = UI_RIGHT;
// soundOptionsInfo.display.color = color_red;
soundOptionsInfo.sound.generic.type = MTYPE_PTEXT;
soundOptionsInfo.sound.generic.flags = QMF_RIGHT_JUSTIFY;
soundOptionsInfo.sound.generic.id = ID_SOUND;
soundOptionsInfo.sound.generic.callback = UI_SoundOptionsMenu_Event;
soundOptionsInfo.sound.generic.x = 216;
soundOptionsInfo.sound.generic.y = 240;
soundOptionsInfo.sound.generic.y = 256 - PROP_HEIGHT;
soundOptionsInfo.sound.string = "SOUND";
soundOptionsInfo.sound.style = UI_RIGHT;
soundOptionsInfo.sound.color = color_red;
@ -303,7 +303,7 @@ static void UI_SoundOptionsMenu_Init( void ) {
soundOptionsInfo.network.generic.id = ID_NETWORK;
soundOptionsInfo.network.generic.callback = UI_SoundOptionsMenu_Event;
soundOptionsInfo.network.generic.x = 216;
soundOptionsInfo.network.generic.y = 240 + PROP_HEIGHT;
soundOptionsInfo.network.generic.y = 256;
soundOptionsInfo.network.string = "NETWORK";
soundOptionsInfo.network.style = UI_RIGHT;
soundOptionsInfo.network.color = color_red;
@ -386,7 +386,7 @@ static void UI_SoundOptionsMenu_Init( void ) {
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.framel );
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.framer );
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.graphics );
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.display );
// Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.display );
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.sound );
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.network );
Menu_AddItem( &soundOptionsInfo.menu, ( void * ) &soundOptionsInfo.sfxvolume );

View file

@ -248,6 +248,11 @@ GRAPHICS OPTIONS MENU
#define ID_SOUND 108
#define ID_NETWORK 109
#define ID_RATIO 110
#define ID_REFRESHRATE 111
#define ID_DYNAMICLIGHTS 112
#define ID_SYNCEVERYFRAME 113
#define NUM_REFRESHRATE 4
typedef struct {
menuframework_s menu;
@ -274,6 +279,9 @@ typedef struct {
menulist_s geometry;
menulist_s filter;
menutext_s driverinfo;
menulist_s refreshrate;
menuradiobutton_s dynamiclights;
menuradiobutton_s synceveryframe;
menubitmap_s apply;
menubitmap_s back;
@ -291,6 +299,9 @@ typedef struct
int filter;
int driver;
qboolean extensions;
int refreshrate;
qboolean dynamiclights;
qboolean synceveryframe;
} InitialVideoOptions_s;
static InitialVideoOptions_s s_ivo;
@ -455,8 +466,8 @@ static void GraphicsOptions_GetAspectRatios( void )
ratioToRes[i] = r;
}
ratios[r] = ratioBuf[r];
resToRatio[r] = i;
ratios[r] = ratioBuf[r];
resToRatio[r] = i;
}
ratios[r] = NULL;
@ -479,6 +490,9 @@ static void GraphicsOptions_GetInitialVideo( void )
s_ivo.geometry = s_graphicsoptions.geometry.curvalue;
s_ivo.filter = s_graphicsoptions.filter.curvalue;
s_ivo.texturebits = s_graphicsoptions.texturebits.curvalue;
s_ivo.refreshrate = s_graphicsoptions.refreshrate.curvalue;
s_ivo.dynamiclights = s_graphicsoptions.dynamiclights.curvalue;
s_ivo.synceveryframe = s_graphicsoptions.synceveryframe.curvalue;
}
/*
@ -774,6 +788,34 @@ static void GraphicsOptions_Event( void* ptr, int event ) {
resToRatio[ s_graphicsoptions.mode.curvalue ];
break;
case ID_REFRESHRATE: {
int refresh;
switch (s_graphicsoptions.refreshrate.curvalue) {
case 0:
refresh = 60;
break;
case 1:
refresh = 72;
break;
case 2:
refresh = 80;
break;
case 3:
refresh = 90;
break;
}
trap_Cvar_SetValue("vr_refreshrate", refresh);
}
break;
case ID_DYNAMICLIGHTS:
trap_Cvar_SetValue( "r_dynamiclight", s_graphicsoptions.dynamiclights.curvalue );
break;
case ID_SYNCEVERYFRAME:
trap_Cvar_SetValue( "r_finish", s_graphicsoptions.synceveryframe.curvalue );
break;
case ID_LIST:
ivo = &s_ivo_templates[s_graphicsoptions.list.curvalue];
@ -787,6 +829,7 @@ static void GraphicsOptions_Event( void* ptr, int event ) {
s_graphicsoptions.geometry.curvalue = ivo->geometry;
s_graphicsoptions.filter.curvalue = ivo->filter;
s_graphicsoptions.fs.curvalue = ivo->fullscreen;
s_graphicsoptions.refreshrate.curvalue = ivo->refreshrate;
break;
case ID_DRIVERINFO:
@ -800,10 +843,10 @@ static void GraphicsOptions_Event( void* ptr, int event ) {
case ID_GRAPHICS:
break;
case ID_DISPLAY:
UI_PopMenu();
UI_DisplayOptionsMenu();
break;
// case ID_DISPLAY:
// UI_PopMenu();
// UI_DisplayOptionsMenu();
// break;
case ID_SOUND:
UI_PopMenu();
@ -957,6 +1000,24 @@ static void GraphicsOptions_SetMenuItems( void )
{
s_graphicsoptions.colordepth.curvalue = 1;
}
switch ( (int) trap_Cvar_VariableValue( "vr_refreshrate" ) )
{
case 60:
s_graphicsoptions.refreshrate.curvalue = 0;
break;
case 72:
s_graphicsoptions.refreshrate.curvalue = 1;
break;
case 80:
s_graphicsoptions.refreshrate.curvalue = 2;
break;
case 90:
s_graphicsoptions.refreshrate.curvalue = 3;
break;
}
s_graphicsoptions.dynamiclights.curvalue = trap_Cvar_VariableValue( "r_dynamiclight" ) != 0;
s_graphicsoptions.synceveryframe.curvalue = trap_Cvar_VariableValue( "r_finish" ) != 0;
}
/*
@ -1026,6 +1087,14 @@ void GraphicsOptions_MenuInit( void )
"On",
NULL
};
static const char *s_refreshrate[] =
{
"60",
"72 (Default)",
"80",
"90",
NULL
};
int y;
@ -1069,27 +1138,27 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.graphics.generic.id = ID_GRAPHICS;
s_graphicsoptions.graphics.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.graphics.generic.x = 216;
s_graphicsoptions.graphics.generic.y = 240 - 2 * PROP_HEIGHT;
s_graphicsoptions.graphics.generic.y = 256 - 2 * PROP_HEIGHT;
s_graphicsoptions.graphics.string = "GRAPHICS";
s_graphicsoptions.graphics.style = UI_RIGHT;
s_graphicsoptions.graphics.color = color_red;
s_graphicsoptions.display.generic.type = MTYPE_PTEXT;
s_graphicsoptions.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
s_graphicsoptions.display.generic.id = ID_DISPLAY;
s_graphicsoptions.display.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.display.generic.x = 216;
s_graphicsoptions.display.generic.y = 240 - PROP_HEIGHT;
s_graphicsoptions.display.string = "DISPLAY";
s_graphicsoptions.display.style = UI_RIGHT;
s_graphicsoptions.display.color = color_red;
// s_graphicsoptions.display.generic.type = MTYPE_PTEXT;
// s_graphicsoptions.display.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
// s_graphicsoptions.display.generic.id = ID_DISPLAY;
// s_graphicsoptions.display.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.display.generic.x = 216;
// s_graphicsoptions.display.generic.y = 240 - PROP_HEIGHT;
// s_graphicsoptions.display.string = "DISPLAY";
// s_graphicsoptions.display.style = UI_RIGHT;
// s_graphicsoptions.display.color = color_red;
s_graphicsoptions.sound.generic.type = MTYPE_PTEXT;
s_graphicsoptions.sound.generic.flags = QMF_RIGHT_JUSTIFY|QMF_PULSEIFFOCUS;
s_graphicsoptions.sound.generic.id = ID_SOUND;
s_graphicsoptions.sound.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.sound.generic.x = 216;
s_graphicsoptions.sound.generic.y = 240;
s_graphicsoptions.sound.generic.y = 256 - PROP_HEIGHT;
s_graphicsoptions.sound.string = "SOUND";
s_graphicsoptions.sound.style = UI_RIGHT;
s_graphicsoptions.sound.color = color_red;
@ -1099,12 +1168,12 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.network.generic.id = ID_NETWORK;
s_graphicsoptions.network.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.network.generic.x = 216;
s_graphicsoptions.network.generic.y = 240 + PROP_HEIGHT;
s_graphicsoptions.network.generic.y = 256;
s_graphicsoptions.network.string = "NETWORK";
s_graphicsoptions.network.style = UI_RIGHT;
s_graphicsoptions.network.color = color_red;
y = 240 - 7 * (BIGCHAR_HEIGHT + 2);
y = 272 - 7 * (BIGCHAR_HEIGHT + 2);
s_graphicsoptions.list.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.list.generic.name = "Graphics Settings:";
s_graphicsoptions.list.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
@ -1115,43 +1184,65 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.list.itemnames = s_graphics_options_names;
y += 2 * ( BIGCHAR_HEIGHT + 2 );
s_graphicsoptions.driver.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.driver.generic.name = "GL Driver:";
s_graphicsoptions.driver.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.driver.generic.x = 400;
s_graphicsoptions.driver.generic.y = y;
s_graphicsoptions.driver.itemnames = s_driver_names;
s_graphicsoptions.driver.curvalue = (uis.glconfig.driverType == GLDRV_VOODOO);
// s_graphicsoptions.driver.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.driver.generic.name = "GL Driver:";
// s_graphicsoptions.driver.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.driver.generic.x = 400;
// s_graphicsoptions.driver.generic.y = y;
// s_graphicsoptions.driver.itemnames = s_driver_names;
// s_graphicsoptions.driver.curvalue = (uis.glconfig.driverType == GLDRV_VOODOO);
// y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_allowExtensions"
// s_graphicsoptions.allow_extensions.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.allow_extensions.generic.name = "GL Extensions:";
// s_graphicsoptions.allow_extensions.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.allow_extensions.generic.x = 400;
// s_graphicsoptions.allow_extensions.generic.y = y;
// s_graphicsoptions.allow_extensions.itemnames = enabled_names;
// y += BIGCHAR_HEIGHT+2;
// s_graphicsoptions.ratio.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.ratio.generic.name = "Aspect Ratio:";
// s_graphicsoptions.ratio.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.ratio.generic.x = 400;
// s_graphicsoptions.ratio.generic.y = y;
// s_graphicsoptions.ratio.itemnames = ratios;
// s_graphicsoptions.ratio.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.ratio.generic.id = ID_RATIO;
// y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_mode"
// s_graphicsoptions.mode.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.mode.generic.name = "Resolution:";
// s_graphicsoptions.mode.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.mode.generic.x = 400;
// s_graphicsoptions.mode.generic.y = y;
// s_graphicsoptions.mode.itemnames = resolutions;
// s_graphicsoptions.mode.generic.callback = GraphicsOptions_Event;
// s_graphicsoptions.mode.generic.id = ID_MODE;
// y += BIGCHAR_HEIGHT+2;
// references "vr_refreshrate"
s_graphicsoptions.refreshrate.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.refreshrate.generic.name = "Refresh Rate:";
s_graphicsoptions.refreshrate.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.refreshrate.generic.x = 400;
s_graphicsoptions.refreshrate.generic.y = y;
s_graphicsoptions.refreshrate.itemnames = s_refreshrate;
s_graphicsoptions.refreshrate.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.refreshrate.generic.id = ID_REFRESHRATE;
s_graphicsoptions.refreshrate.numitems = NUM_REFRESHRATE;
y += BIGCHAR_HEIGHT+2;
// references/modifies "r_allowExtensions"
s_graphicsoptions.allow_extensions.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.allow_extensions.generic.name = "GL Extensions:";
s_graphicsoptions.allow_extensions.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.allow_extensions.generic.x = 400;
s_graphicsoptions.allow_extensions.generic.y = y;
s_graphicsoptions.allow_extensions.itemnames = enabled_names;
y += BIGCHAR_HEIGHT+2;
s_graphicsoptions.ratio.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.ratio.generic.name = "Aspect Ratio:";
s_graphicsoptions.ratio.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.ratio.generic.x = 400;
s_graphicsoptions.ratio.generic.y = y;
s_graphicsoptions.ratio.itemnames = ratios;
s_graphicsoptions.ratio.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.ratio.generic.id = ID_RATIO;
y += BIGCHAR_HEIGHT+2;
// references/modifies "r_mode"
s_graphicsoptions.mode.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.mode.generic.name = "Resolution:";
s_graphicsoptions.mode.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.mode.generic.x = 400;
s_graphicsoptions.mode.generic.y = y;
s_graphicsoptions.mode.itemnames = resolutions;
s_graphicsoptions.mode.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.mode.generic.id = ID_MODE;
// references "r_finish"
s_graphicsoptions.synceveryframe.generic.type = MTYPE_RADIOBUTTON;
s_graphicsoptions.synceveryframe.generic.name = "Sync Every Frame:";
s_graphicsoptions.synceveryframe.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.synceveryframe.generic.x = 400;
s_graphicsoptions.synceveryframe.generic.y = y;
s_graphicsoptions.synceveryframe.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.synceveryframe.generic.id = ID_SYNCEVERYFRAME;
y += BIGCHAR_HEIGHT+2;
// references "r_colorbits"
@ -1163,14 +1254,14 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.colordepth.itemnames = colordepth_names;
y += BIGCHAR_HEIGHT+2;
// references/modifies "r_fullscreen"
s_graphicsoptions.fs.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.fs.generic.name = "Fullscreen:";
s_graphicsoptions.fs.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.fs.generic.x = 400;
s_graphicsoptions.fs.generic.y = y;
s_graphicsoptions.fs.itemnames = enabled_names;
y += BIGCHAR_HEIGHT+2;
// // references/modifies "r_fullscreen"
// s_graphicsoptions.fs.generic.type = MTYPE_SPINCONTROL;
// s_graphicsoptions.fs.generic.name = "Fullscreen:";
// s_graphicsoptions.fs.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
// s_graphicsoptions.fs.generic.x = 400;
// s_graphicsoptions.fs.generic.y = y;
// s_graphicsoptions.fs.itemnames = enabled_names;
// y += BIGCHAR_HEIGHT+2;
// references/modifies "r_vertexLight"
s_graphicsoptions.lighting.generic.type = MTYPE_SPINCONTROL;
@ -1181,6 +1272,16 @@ void GraphicsOptions_MenuInit( void )
s_graphicsoptions.lighting.itemnames = lighting_names;
y += BIGCHAR_HEIGHT+2;
// references/modifies "r_dynamiclight"
s_graphicsoptions.dynamiclights.generic.type = MTYPE_RADIOBUTTON;
s_graphicsoptions.dynamiclights.generic.name = "Dynamic Lights:";
s_graphicsoptions.dynamiclights.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
s_graphicsoptions.dynamiclights.generic.x = 400;
s_graphicsoptions.dynamiclights.generic.y = y;
s_graphicsoptions.dynamiclights.generic.callback = GraphicsOptions_Event;
s_graphicsoptions.dynamiclights.generic.id = ID_DYNAMICLIGHTS;
y += BIGCHAR_HEIGHT+2;
// references/modifies "r_lodBias" & "subdivisions"
s_graphicsoptions.geometry.generic.type = MTYPE_SPINCONTROL;
s_graphicsoptions.geometry.generic.name = "Geometric Detail:";
@ -1255,18 +1356,21 @@ void GraphicsOptions_MenuInit( void )
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.framer );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.graphics );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.display );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.display );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.sound );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.network );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.list );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driver );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.allow_extensions );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.ratio );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.mode );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.driver );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.allow_extensions );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.ratio );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.mode );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.refreshrate );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.synceveryframe );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.colordepth );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.fs );
// Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.fs );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.lighting );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.dynamiclights );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.geometry );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.tq );
Menu_AddItem( &s_graphicsoptions.menu, ( void * ) &s_graphicsoptions.texturebits );

View file

@ -669,7 +669,7 @@ void SV_Init (void)
sv_zombietime = Cvar_Get ("sv_zombietime", "2", CVAR_TEMP );
Cvar_Get ("nextmap", "", CVAR_TEMP );
sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO);
sv_allowDownload = Cvar_Get ("sv_allowDownload", "1", CVAR_SERVERINFO);
Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE);
sv_master[0] = Cvar_Get("sv_master1", "", 0); // This is set to our Q3Q master

View file

@ -27,6 +27,7 @@ cvar_t *vr_extralatencymode = NULL;
cvar_t *vr_directionMode = NULL;
cvar_t *vr_weaponPitch = NULL;
cvar_t *vr_twoHandedWeapons = NULL;
cvar_t *vr_altKeyEnabled = NULL;
cvar_t *vr_refreshrate = NULL;
cvar_t *vr_weaponScope = NULL;
cvar_t *vr_rollWhenHit = NULL;
@ -34,6 +35,7 @@ cvar_t *vr_hudYOffset = NULL;
cvar_t *vr_sendRollToServer = NULL;
cvar_t *vr_lasersight = NULL;
cvar_t *vr_hapticIntensity = NULL;
cvar_t *vr_comfortVignette = NULL;
engine_t* VR_Init( ovrJava java )
{
@ -62,6 +64,7 @@ void VR_InitCvars( void )
vr_weaponPitch = Cvar_Get ("vr_weaponPitch", "-20", CVAR_ARCHIVE);
vr_heightAdjust = Cvar_Get ("vr_heightAdjust", "0.0", CVAR_ARCHIVE);
vr_twoHandedWeapons = Cvar_Get ("vr_twoHandedWeapons", "1", CVAR_ARCHIVE);
vr_altKeyEnabled = Cvar_Get ("vr_altKeyEnabled", "0", CVAR_ARCHIVE);
vr_refreshrate = Cvar_Get ("vr_refreshrate", "72", CVAR_ARCHIVE);
vr_weaponScope = Cvar_Get ("vr_weaponScope", "1", CVAR_ARCHIVE);
vr_rollWhenHit = Cvar_Get ("vr_rollWhenHit", "0", CVAR_ARCHIVE);
@ -69,6 +72,7 @@ void VR_InitCvars( void )
vr_sendRollToServer = Cvar_Get ("vr_sendRollToServer", "1", CVAR_ARCHIVE);
vr_lasersight = Cvar_Get ("vr_lasersight", "0", CVAR_ARCHIVE);
vr_hapticIntensity = Cvar_Get ("vr_hapticIntensity", "1.0", CVAR_ARCHIVE);
vr_comfortVignette = Cvar_Get ("vr_comfortVignette", "0.0", CVAR_ARCHIVE);
// Values are: scale,right,up,forward,pitch,yaw,roll
// VALUES PROVIDED BY SkillFur - Thank-you!

View file

@ -250,7 +250,8 @@ static void IN_SendButtonAction(const char* action, qboolean pressed)
//handle our special actions first
if (strcmp(action, "+alt") == 0)
{
alt_key_mode_active = pressed;
qboolean alt_key_enabled = Cvar_VariableValue( "vr_altKeyEnabled" ) != 0;
alt_key_mode_active = pressed && alt_key_enabled;
}
else if (strcmp(action, "+weapon_stabilise") == 0)
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.