mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add cl_unpredicted_shadow
This commit is contained in:
parent
b8fce1c0f4
commit
61a5d9429d
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue