From 5563ae9a7b2225515789135429d5893f75a1daf9 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 28 Mar 2014 23:53:12 +0100 Subject: [PATCH] Make DDRace tile prediction optional --- src/engine/shared/config_variables.h | 1 + src/game/gamecore.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h index d86d97152..5d86faa09 100644 --- a/src/engine/shared/config_variables.h +++ b/src/engine/shared/config_variables.h @@ -241,6 +241,7 @@ MACRO_CONFIG_INT(SvNetlimitAlpha, sv_netlimit_alpha, 50, 1, 100, CFGFLAG_SERVER, MACRO_CONFIG_INT(SvJetpack, sv_jetpack, 400, -10000, 10000, CFGFLAG_SERVER, "Jetpack strength") MACRO_CONFIG_INT(ClUnpredictedShadow, cl_unpredicted_shadow, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show unpredicted shadow tee to estimate your delay") +MACRO_CONFIG_INT(ClPredictDDRace, cl_predict_ddrace, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Predict some DDRace tiles") MACRO_CONFIG_INT(ClShowNinja, cl_show_ninja, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ninja skin") #endif diff --git a/src/game/gamecore.cpp b/src/game/gamecore.cpp index d9908941e..03d5d6587 100644 --- a/src/game/gamecore.cpp +++ b/src/game/gamecore.cpp @@ -473,7 +473,7 @@ void CCharacterCore::Tick(bool UseInput, bool IsClient) } int Index = MapIndex; - if(IsClient && m_pCollision->IsSpeedup(Index)) + if(g_Config.m_ClPredictDDRace && IsClient && m_pCollision->IsSpeedup(Index)) { vec2 Direction, MaxVel, TempVel = m_Vel; int Force, MaxSpeed = 0; @@ -545,7 +545,7 @@ void CCharacterCore::Tick(bool UseInput, bool IsClient) } } - if(IsClient) + if(g_Config.m_ClPredictDDRace && IsClient) { if(((m_TileIndex == TILE_STOP && m_TileFlags == ROTATION_270) || (m_TileIndexL == TILE_STOP && m_TileFlagsL == ROTATION_270) || (m_TileIndexL == TILE_STOPS && (m_TileFlagsL == ROTATION_90 || m_TileFlagsL ==ROTATION_270)) || (m_TileIndexL == TILE_STOPA) || (m_TileFIndex == TILE_STOP && m_TileFFlags == ROTATION_270) || (m_TileFIndexL == TILE_STOP && m_TileFFlagsL == ROTATION_270) || (m_TileFIndexL == TILE_STOPS && (m_TileFFlagsL == ROTATION_90 || m_TileFFlagsL == ROTATION_270)) || (m_TileFIndexL == TILE_STOPA) || (m_TileSIndex == TILE_STOP && m_TileSFlags == ROTATION_270) || (m_TileSIndexL == TILE_STOP && m_TileSFlagsL == ROTATION_270) || (m_TileSIndexL == TILE_STOPS && (m_TileSFlagsL == ROTATION_90 || m_TileSFlagsL == ROTATION_270)) || (m_TileSIndexL == TILE_STOPA)) && m_Vel.x > 0) {