mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-17 01:31:25 +00:00
- Properly fix default mouse x sensitivity.
This commit is contained in:
parent
25c984ff6e
commit
034202e6f6
4 changed files with 12 additions and 3 deletions
|
@ -48,7 +48,7 @@ int eventhead;
|
|||
int eventtail;
|
||||
event_t events[MAXEVENTS];
|
||||
|
||||
CVAR(Float, m_sensitivity_x, 4.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, m_sensitivity_x, 2.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
CVAR(Float, m_sensitivity_y, 2.f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
|
||||
|
|
|
@ -2678,7 +2678,7 @@ static bool System_DispatchEvent(event_t* ev)
|
|||
}
|
||||
if (!buttonMap.ButtonDown(Button_Strafe) && !lookstrafe)
|
||||
{
|
||||
int turn = int(ev->x * m_yaw * 8.0);
|
||||
int turn = int(ev->x * m_yaw * 16.0);
|
||||
if (invertmousex)
|
||||
turn = -turn;
|
||||
G_AddViewAngle(turn, true);
|
||||
|
|
|
@ -598,6 +598,15 @@ void FGameConfigFile::DoGlobalSetup ()
|
|||
// ooooh boy did i open a can of worms with this one.
|
||||
i_pauseinbackground = !(i_soundinbackground);
|
||||
}
|
||||
if (last < 224)
|
||||
{
|
||||
if (const auto var = FindCVar("m_sensitivity_x", NULL))
|
||||
{
|
||||
UCVarValue v = var->GetGenericRep(CVAR_Float);
|
||||
v.Float *= 0.5f;
|
||||
var->SetGenericRep(v, CVAR_Float);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ const char *GetVersionString();
|
|||
// Version stored in the ini's [LastRun] section.
|
||||
// Bump it if you made some configuration change that you want to
|
||||
// be able to migrate in FGameConfigFile::DoGlobalSetup().
|
||||
#define LASTRUNVERSION "223"
|
||||
#define LASTRUNVERSION "224"
|
||||
|
||||
// Protocol version used in demos.
|
||||
// Bump it if you change existing DEM_ commands or add new ones.
|
||||
|
|
Loading…
Reference in a new issue