New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cl_text_entities (show/hide text in entities) for performance #340
Conversation
Signed-off-by: rbmz <rbmz@users.noreply.github.com>
|
See https://github.com/ddnet/ddnet/pull/340/files?w=1 for an easier-to-read diff. |
| Graphics()->MapScreen(ScreenX0, ScreenY0, ScreenX1, ScreenY1); | ||
| } | ||
|
|
||
| void CRenderTools::RenderSwitchOverlay(CSwitchTile *pSwitch, int w, int h, float Scale, float Alpha) | ||
| { | ||
| if(g_Config.m_ClTextEntities == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and below should probably !g_Config.m_ClTextEntities. Otherwise, the code looks fine to me. What's your use case for this? Does the text rendering slow down the client?
|
Looks fine as a temporal workaround. |
|
gfx_text_overlay does the same no? |
|
@heinrich5991: yes @Chairn: if(EndX - StartX > g_Config.m_GfxScreenWidth / g_Config.m_GfxTextOverlay || EndY - StartY > g_Config.m_GfxScreenHeight / g_Config.m_GfxTextOverlay)
return; // its useless to render text at this distanceit does hide text in teleporters, it also completely hides speedups (instead of just the speedup numbers) |
|
I tested this locally and everything looks fine so far |
|
Since HMH and heinrich looked at it I just merged it and |
cl_text_entities (show/hide text in entities) for performance
|
Thanks for your contribution! |
Signed-off-by: rbmz rbmz@users.noreply.github.com