Skip to content

Commit

Permalink
Change tc_improve_mouse_precision distance to 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Nov 23, 2024
1 parent 8ef9ac6 commit d81809a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/engine/shared/tater_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MACRO_CONFIG_INT(ClPingNameCircle, tc_nameplate_ping_circle, 0, 0, 1, CFGFLAG_CL
MACRO_CONFIG_INT(ClSpecmenuID, tc_spec_menu_ID, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Shows player IDs in spectate menu")

MACRO_CONFIG_INT(ClLimitMouseToScreen, tc_limit_mouse_to_screen, 0, 0, 2, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Limit mouse to screen boundries")
MACRO_CONFIG_INT(ClImproveMousePrecision, tc_improve_mouse_precision, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Improve mouse precision by scaling max distance to 2000")
MACRO_CONFIG_INT(ClImproveMousePrecision, tc_improve_mouse_precision, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Improve mouse precision by scaling max distance to 1000")

MACRO_CONFIG_INT(ClHammerRotatesWithCursor, tc_hammer_rotates_with_cursor, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Allow your hammer to rotate like other weapons")

Expand Down
4 changes: 2 additions & 2 deletions src/game/client/components/controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int CControls::SnapInput(int *pData)
// even if chat or menu are activated
vec2 Pos = m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy];
if(g_Config.m_ClImproveMousePrecision)
Pos *= length(Pos) * 2000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
Pos *= length(Pos) * 1000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
if(!m_pClient->m_Snap.m_SpecInfo.m_Active && !g_Config.m_ClOldMouseZoom)
Pos *= m_pClient->m_Camera.m_Zoom;
m_aInputData[g_Config.m_ClDummy].m_TargetX = (int)Pos.x;
Expand All @@ -235,7 +235,7 @@ int CControls::SnapInput(int *pData)
if(!m_pClient->m_Snap.m_SpecInfo.m_Active)
{
if(g_Config.m_ClImproveMousePrecision)
Pos *= length(Pos) * 2000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
Pos *= length(Pos) * 1000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
if(!g_Config.m_ClOldMouseZoom)
Pos *= m_pClient->m_Camera.m_Zoom;
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/client/components/menus_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3355,7 +3355,7 @@ void CMenus::RenderSettingsTClient(CUIRect MainView)
Column.HSplitTop(MarginSmall, nullptr, &Column);
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClOldMouseZoom, Localize("Old Mouse Precision (fixes precision at low zoom levels, \nbreaks /tc, /telecursor while zoomed)"), &g_Config.m_ClOldMouseZoom, &Column, LineSize);
Column.HSplitTop(MarginSmall, nullptr, &Column);
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClImproveMousePrecision, Localize("Improve mouse precision by scaling max distance to 2000"), &g_Config.m_ClImproveMousePrecision, &Column, LineSize);
DoButton_CheckBoxAutoVMarginAndSet(&g_Config.m_ClImproveMousePrecision, Localize("Improve mouse precision by scaling max distance to 1000"), &g_Config.m_ClImproveMousePrecision, &Column, LineSize);
s_SectionBoxes.back().h = Column.y - s_SectionBoxes.back().y;

// ***** Anti Latency Tools ***** //
Expand Down
6 changes: 3 additions & 3 deletions src/game/client/components/players.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void CPlayers::RenderHookCollLine(
// just use the direct input if it's the local player we are rendering
vec2 Pos = m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy];
if(g_Config.m_ClImproveMousePrecision)
Pos *= length(Pos) * 2000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
Pos *= length(Pos) * 1000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
if(!g_Config.m_ClOldMouseZoom)
Pos *= m_pClient->m_Camera.m_Zoom;
Pos.x = (int)Pos.x;
Expand Down Expand Up @@ -474,7 +474,7 @@ void CPlayers::RenderPlayer(
// just use the direct input if it's the local player we are rendering
vec2 Pos = m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy];
if(g_Config.m_ClImproveMousePrecision)
Pos *= length(Pos) * 2000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
Pos *= length(Pos) * 1000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
if(!g_Config.m_ClOldMouseZoom)
Pos *= m_pClient->m_Camera.m_Zoom;
Pos.x = (int)Pos.x;
Expand Down Expand Up @@ -909,7 +909,7 @@ void CPlayers::RenderPlayerGhost(
// just use the direct input if it's the local player we are rendering
vec2 Pos = m_pClient->m_Controls.m_aMousePos[g_Config.m_ClDummy];
if(g_Config.m_ClImproveMousePrecision)
Pos *= length(Pos) * 2000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
Pos *= length(Pos) * 1000.0f / (float)(g_Config.m_ClDyncam ? g_Config.m_ClDyncamMaxDistance : g_Config.m_ClMouseMaxDistance);
if(!g_Config.m_ClOldMouseZoom)
Pos *= m_pClient->m_Camera.m_Zoom;
Pos.x = (int)Pos.x;
Expand Down

0 comments on commit d81809a

Please sign in to comment.