mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add show angle in debug
This commit is contained in:
parent
716b61df23
commit
592d2d7556
|
@ -31,7 +31,7 @@ void CDebugHud::RenderNetCorrections()
|
|||
float Velspeed = length(vec2(m_pClient->m_Snap.m_pLocalCharacter->m_VelX/256.0f, m_pClient->m_Snap.m_pLocalCharacter->m_VelY/256.0f))*50;
|
||||
float Ramp = VelocityRamp(Velspeed, m_pClient->m_Tuning[g_Config.m_ClDummy].m_VelrampStart, m_pClient->m_Tuning[g_Config.m_ClDummy].m_VelrampRange, m_pClient->m_Tuning[g_Config.m_ClDummy].m_VelrampCurvature);
|
||||
|
||||
const char *paStrings[] = {"velspeed:", "velspeed*ramp:", "ramp:", "Pos", " x:", " y:", "netobj corrections", " num:", " on:"};
|
||||
const char *paStrings[] = {"velspeed:", "velspeed*ramp:", "ramp:", "Pos", " x:", " y:", "angle:", "netobj corrections", " num:", " on:"};
|
||||
const int Num = sizeof(paStrings)/sizeof(char *);
|
||||
const float LineHeight = 6.0f;
|
||||
const float Fontsize = 5.0f;
|
||||
|
@ -61,6 +61,10 @@ void CDebugHud::RenderNetCorrections()
|
|||
str_format(aBuf, sizeof(aBuf), "%.2f", static_cast<float>(m_pClient->m_Snap.m_pLocalCharacter->m_Y)/32.0f);
|
||||
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
|
||||
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
|
||||
y += LineHeight;
|
||||
str_format(aBuf, sizeof(aBuf), "%d", m_pClient->m_Snap.m_pLocalCharacter->m_Angle);
|
||||
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
|
||||
TextRender()->Text(0, x-w, y, Fontsize, aBuf, -1);
|
||||
y += 2*LineHeight;
|
||||
str_format(aBuf, sizeof(aBuf), "%d", m_pClient->NetobjNumCorrections());
|
||||
w = TextRender()->TextWidth(0, Fontsize, aBuf, -1);
|
||||
|
|
Loading…
Reference in a new issue