From f86aa863c42b50dbc76cf5d4bc11cb2e65c8cbcf Mon Sep 17 00:00:00 2001 From: Tater Date: Mon, 16 Sep 2024 21:26:03 -0500 Subject: [PATCH] reduce lag of tc_remove_anti on full servers --- src/game/client/gameclient.cpp | 9 +++++++++ src/game/tater_variables.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 0e009a70682..f0c3e4d243e 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -2300,6 +2300,15 @@ void CGameClient::OnPredict() if(g_Config.m_ClRemoveAnti) { m_ExtraPredictedWorld.CopyWorld(&m_PredictedWorld); + + // Remove other tees to reduce lag and because they aren't really important in this case + for(int i = 0; i < MAX_CLIENTS; i++) + if(i != m_Snap.m_LocalClientId) + if (CCharacter* pDelChar = m_ExtraPredictedWorld.GetCharacterById(i)) + pDelChar->Destroy(); + + + CCharacter *pExtraChar = m_ExtraPredictedWorld.GetCharacterById(m_Snap.m_LocalClientId); if(pExtraChar) { diff --git a/src/game/tater_variables.h b/src/game/tater_variables.h index 9a8ce93b8aa..43b135d34ae 100644 --- a/src/game/tater_variables.h +++ b/src/game/tater_variables.h @@ -30,7 +30,7 @@ MACRO_CONFIG_INT(ClLimitMouseToScreen, tc_limit_mouse_to_screen, 0, 0, 2, CFGFLA MACRO_CONFIG_INT(ClFreezeUpdateFix, tc_freeze_update_fix, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Will change your skin faster when you enter freeze. ") MACRO_CONFIG_INT(ClRemoveAnti, tc_remove_anti, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Removes some amount of antiping & player prediction in freeze") MACRO_CONFIG_INT(ClUnfreezeLagTicks, tc_remove_anti_ticks, 5, 0, 20, CFGFLAG_CLIENT | CFGFLAG_SAVE, "The biggest amount of prediction ticks that are removed") -MACRO_CONFIG_INT(ClUnfreezeLagDelayTicks, tc_remove_anti_delay_ticks, 100, 0, 150, CFGFLAG_CLIENT | CFGFLAG_SAVE, "How many ticks it takes to remove the maximum prediction after being frozen") +MACRO_CONFIG_INT(ClUnfreezeLagDelayTicks, tc_remove_anti_delay_ticks, 25, 0, 150, CFGFLAG_CLIENT | CFGFLAG_SAVE, "How many ticks it takes to remove the maximum prediction after being frozen") MACRO_CONFIG_INT(ClUnpredOthersInFreeze, tc_unpred_others_in_freeze, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Dont predict other players if you are frozen") MACRO_CONFIG_INT(ClPredMarginInFreeze, tc_pred_margin_in_freeze, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "enable changing prediction margin while frozen")