-
Notifications
You must be signed in to change notification settings - Fork 423
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
Clean up nameplates #9284
base: master
Are you sure you want to change the base?
Clean up nameplates #9284
Conversation
|
ff9c74c
to
27129e9
Compare
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.
Combine hook strength icon and id onto single line, now uses clan size
This should not be scaled by the clan size, that's just confusing.
Allow nameplate size to go to -50 (0 is too big)
This feels really niche, I don't think that 0 is too big. I tried -50
and the nameplates are microscopic.
@@ -35,6 +35,8 @@ struct SPlayerNamePlate | |||
char m_aClan[MAX_CLAN_LENGTH]; | |||
STextContainerIndex m_ClanTextContainerIndex; | |||
float m_ClanTextFontSize; | |||
|
|||
float m_Zoom, m_ZoomClan; |
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.
If I understand correctly, the goal is that the text is supposed to look "high quality" while zoomed in? I tried zooming a bit in game and the text quality is changing back and forth while doing it, which looks super weird and leads to lag spikes on low zooms.
It will also become desynced if you use zoom
.
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.
It was laggy when I made it scale by the zoom level, but when I changed it to the target zoom it stopped being laggy. I think this should be a thing, but the current implementation must, from your experience, be wrong
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.
I've removed this and now everything is rendered at the same zoom level. I don't like it but atleast its consistent.
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.
Thanks, that looks a lot better.
Other than making a new variable to control it, I didn't know what else to use. Since it appears above the clan using the name size looked off, and I wanted it to scale rather than it being as big as it was
Me and someone in the TClient server wanted to have smaller nameplates, I thought why not let it be microscopic since 1. it's still visible 2. why not let the user do it, its kinda funny 3. the change is visible in the preview |
Then make a new variable. Using the clan size variable is confusing due to the name of it, and clan visibility is also optional. |
070d0bf
to
c3ca2b4
Compare
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.
Currently name plates are always rendered for yourself, which should only be the case if cl_nameplates_own
is enabled.
MACRO_CONFIG_INT(ClNameplatesOwn, cl_nameplates_own, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show own name plate (useful for demo recording)") | ||
MACRO_CONFIG_INT(ClNameplatesFriendMark, cl_nameplates_friendmark, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show friend mark (♥) in name plates") | ||
MACRO_CONFIG_INT(ClNameplatesStrong, cl_nameplates_strong, 0, 0, 2, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show strong/weak in name plates (0 - off, 1 - icons, 2 - icons + numbers)") | ||
MACRO_CONFIG_INT(ClNameplatesStrongSize, cl_nameplates_strong_size, 30, -50, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Size of strong/weak state icons and numbers") |
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.
Default value should be 50
, to match the old default size.
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.
I think the default size is too large since normally you are only looking at if it's green or red
if(OtherTeam) | ||
Data.Alpha *= (float)g_Config.m_ClShowOthersAlpha / 100.0f; | ||
} | ||
// if (Data.Alpha <= 0.05f) return; |
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.
Remove dead code
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.
Oops I meant to uncomment that and then also ask you about this.
It will attempt to render nameplates which are fully transparent which is a waste of time. I didn't know if I should just do == 0.0f
or have a threshold
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.
The textrender already skips rendering transparent quads so I think this is unnecessary optimization.
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.
But it does alot of work other than rendering
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.
Compile in release mode and do some benchmarks if you think it matters.
|
||
void CNameplates::RenderNameplate(SNameplate &NamePlate, SRenderNameplatedata Data) | ||
{ | ||
// if (Data.Alpha <= 0.05f) return; |
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.
Remove dead code
1c3f5de
to
b7cb166
Compare
b7cb166
to
faada04
Compare
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.
Checklist
Stuff changed
Screenshots