Open Ghost99 opened 11 years ago
Windows + Half-Life affected too
Can we please get this fixed? It's crazy annoying.
This is an issue in all GoldSource engine games that use autoaim since they're all based off of the same thing.
Fixing it is pretty easy. This is the code involved in the bug: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/player.cpp#L4319-L4330
Modify it to be like this:
// Don't send across network if sv_aim is 0
if ( g_psv_aim->value != 0 )
{
if ( m_vecAutoAim.x != m_lastx ||
m_vecAutoAim.y != m_lasty )
{
SET_CROSSHAIRANGLE( edict(), -m_vecAutoAim.x, m_vecAutoAim.y );
m_lastx = m_vecAutoAim.x;
m_lasty = m_vecAutoAim.y;
}
}
else
{
ResetAutoaim();
}
If sv_aim
is set to 0 while the crosshair is autoaiming it will properly reset the angles. Note that the crosshair's current location is considered to be the center of the screen so turning off autoaim will center the screen on the crosshair, not the other way around.
After autoaim option disabling cursor can be not centered on screen. Steps to reproduce:
I can confirm that bug on GNU/Linux.