Add cl_unpredicted_shadow

This commit is contained in:
def 2014-03-21 14:01:14 +01:00
parent b8fce1c0f4
commit 61a5d9429d
3 changed files with 8 additions and 1 deletions

View file

@ -235,5 +235,6 @@ MACRO_CONFIG_INT(SvNetlimit, sv_netlimit, 0, 0, 10000, CFGFLAG_SERVER, "Netlimit
MACRO_CONFIG_INT(SvNetlimitAlpha, sv_netlimit_alpha, 50, 1, 100, CFGFLAG_SERVER, "Netlimit: Alpha of Exponention moving average")
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")
#endif

View file

@ -1154,6 +1154,12 @@ void CMenus::RenderSettingsDDRace(CUIRect MainView)
g_Config.m_ClEditorUndo ^= 1;
}
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_ClUnpredictedShadow, Localize("Show unpredicted shadow tee to estimate your delay"), g_Config.m_ClUnpredictedShadow, &Button))
{
g_Config.m_ClUnpredictedShadow ^= 1;
}
CUIRect aRects[2];
CUIRect Label;
MainView.HSplitTop(5.0f, 0, &MainView);

View file

@ -774,7 +774,7 @@ void CPlayers::RenderPlayer(
}
// render the "shadow" tee
if(pInfo.m_Local && g_Config.m_Debug)
if(pInfo.m_Local && (g_Config.m_Debug || g_Config.m_ClUnpredictedShadow))
{
vec2 GhostPosition = mix(vec2(pPrevChar->m_X, pPrevChar->m_Y), vec2(pPlayerChar->m_X, pPlayerChar->m_Y), Client()->IntraGameTick());
CTeeRenderInfo Ghost = RenderInfo;