Skip to content

cl_text_entities (show/hide text in entities) for performance#340

Merged
timakro merged 1 commit intoddnet:masterfrom
eagle-provision:master
Nov 7, 2015
Merged

cl_text_entities (show/hide text in entities) for performance#340
timakro merged 1 commit intoddnet:masterfrom
eagle-provision:master

Conversation

@eagle-provision
Copy link
Contributor

Signed-off-by: rbmz rbmz@users.noreply.github.com

Signed-off-by: rbmz <rbmz@users.noreply.github.com>
@heinrich5991
Copy link
Member

See https://github.com/ddnet/ddnet/pull/340/files?w=1 for an easier-to-read diff.

Copy link
Member

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?

@ghost
Copy link

ghost commented Oct 2, 2015

Looks fine as a temporal workaround.
Changes to the text render would improve the performance overall (batching the draw calls)

@Chairn
Copy link
Contributor

Chairn commented Oct 2, 2015

gfx_text_overlay does the same no?

@eagle-provision
Copy link
Contributor Author

@heinrich5991: yes

@Chairn:
I did not know about gfx_text_overlay.
Seems to be used as a parameter to decide whether to hide text when zooming out:

  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 distance

it does hide text in teleporters, it also completely hides speedups (instead of just the speedup numbers)

@H-M-H
Copy link
Member

H-M-H commented Oct 21, 2015

I tested this locally and everything looks fine so far
@Rbmz please be so kind and change g_Config.m_ClTextEntities == 0 to !g_Config.m_ClTextEntities as heinrich5991 suggested, then I will likely merge :)

@timakro
Copy link
Member

timakro commented Nov 7, 2015

Since HMH and heinrich looked at it I just merged it and
changed g_Config.m_ClTextEntities == 0 to !g_Config.m_ClTextEntities in 201782d.

timakro pushed a commit that referenced this pull request Nov 7, 2015
cl_text_entities (show/hide text in entities) for performance
@timakro timakro merged commit cbffcd4 into ddnet:master Nov 7, 2015
@heinrich5991
Copy link
Member

Thanks for your contribution!

M0REKZ pushed a commit to M0REKZ/ddnet that referenced this pull request May 16, 2025
it would try to use TEAM_SPECTATORS (-1) as index
if in fng a player joins spectators before the frozen
enemy is flying into the spikes

you can still switch from blue to red and the new team gets the score
and the player always gets the score even if he joins spectators

Closed ddnet#340
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants