mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-03-15 06:30:54 +00:00
FIxed issue with starting mods from in game
- Ensured the renderer and the sound are reinitialised correctly
This commit is contained in:
parent
ebcec93abc
commit
2a5f027d59
5 changed files with 14 additions and 4 deletions
|
@ -299,6 +299,8 @@ void SNDDMA_Shutdown( void ) {
|
|||
bqPlayerObject = NULL;
|
||||
outputMixObject = NULL;
|
||||
engineObject = NULL;
|
||||
|
||||
snd_inited = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -244,6 +244,7 @@ int max_polyverts;
|
|||
** setting variables, checking GL constants, and reporting the gfx system config
|
||||
** to the user.
|
||||
*/
|
||||
void VR_ReInitRenderer();
|
||||
static void InitOpenGL( void )
|
||||
{
|
||||
//
|
||||
|
@ -295,6 +296,8 @@ static void InitOpenGL( void )
|
|||
|
||||
// set default state
|
||||
GL_SetDefaultState();
|
||||
|
||||
VR_ReInitRenderer();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -68,6 +68,7 @@ void VR_InitCvars( void )
|
|||
Cvar_Get ("vr_weapon_adjustment_8", "0.8,-4.5,6,1.5,0,0,0", CVAR_ARCHIVE);
|
||||
Cvar_Get ("vr_weapon_adjustment_9", "0.8,-5.5,6,0,0,0,0", CVAR_ARCHIVE);
|
||||
|
||||
//Team Arena Weapons
|
||||
Cvar_Get ("vr_weapon_adjustment_10", "0.8,-5.5,6,0,0,0,0", CVAR_ARCHIVE);
|
||||
Cvar_Get ("vr_weapon_adjustment_11", "0.8,-5.5,6,0,0,0,0", CVAR_ARCHIVE);
|
||||
Cvar_Get ("vr_weapon_adjustment_12", "0.8,-5.5,6,0,0,0,0", CVAR_ARCHIVE);
|
||||
|
|
|
@ -459,17 +459,15 @@ static void IN_VRButtonsChanged( qboolean isRightController, uint32_t buttons )
|
|||
//Taunt / Gesture
|
||||
if ((buttons & ovrButton_X) && !(controller->buttons & ovrButton_X)) {
|
||||
sendButtonActionSimple("+button3");
|
||||
//Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_X, qtrue, 0, NULL);
|
||||
} else if (!(buttons & ovrButton_X) && (controller->buttons & ovrButton_X)) {
|
||||
sendButtonActionSimple("-button3");
|
||||
//Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_X, qfalse, 0, NULL);
|
||||
}
|
||||
|
||||
// Y button - unassigned right now
|
||||
if ((buttons & ovrButton_Y) && !(controller->buttons & ovrButton_Y)) {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_Y, qtrue, 0, NULL);
|
||||
//Actually want this to reset the player location
|
||||
vr.realign_weapon = qtrue;
|
||||
} else if (!(buttons & ovrButton_Y) && (controller->buttons & ovrButton_Y)) {
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PAD0_Y, qfalse, 0, NULL);
|
||||
}
|
||||
|
||||
controller->buttons = buttons;
|
||||
|
|
|
@ -120,6 +120,12 @@ void VR_DestroyRenderer( engine_t* engine ) {
|
|||
}
|
||||
|
||||
|
||||
void VR_ReInitRenderer()
|
||||
{
|
||||
VR_DestroyRenderer( VR_GetEngine() );
|
||||
VR_InitRenderer( VR_GetEngine() );
|
||||
}
|
||||
|
||||
|
||||
// Assumes landscape cylinder shape.
|
||||
static ovrMatrix4f CylinderModelMatrix( const int texWidth, const int texHeight,
|
||||
|
|
Loading…
Reference in a new issue