-
Notifications
You must be signed in to change notification settings - Fork 141
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
vscript vgui HUD visibility control #213
vscript vgui HUD visibility control #213
Conversation
…e VScript" This reverts commit 6ceb808.
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.
Looks good to me.
I think the function's namespace and the current capitalization of Hud
work well as-is.
ca47f40
to
3a4249b
Compare
Is there any reason in particular this was marked as a draft? I was planning to merge this for Mapbase v7.1, and while it's okay if you have reasons for this to not be merged yet, I would either have to wait for this PR or remove the current |
3a4249b
to
e37853b
Compare
I set it to draft as I was fixing some bugs, but then I noticed more issues to resolve, I thought I would just include them here (let me know if you think the non-vgui fixes should be a separate PR). 3D skybox angle calculation is reduced from fake_worldportal optimisation also reduces multiple angle/matrix/vector conversions into simple matrix calculations. This clipping plane fix technically changes what the entity used to display, but the existing values made no sense. Here is a video comparing old and new: https://youtu.be/4AJ5tbOAGMw The worldportal optimisation changes some existing questionable design choices. In 7.0, brush angles are used in view transformation, which is an issue on its own as brushes never have any angles unless manually input by the user. Map-placed brushes with render target faces in different directions will result in inconsistent renders. This could have been avoided by choosing to implement Portal 2's linked_portal_door entity behaviour, using 2 point entities which could be oriented freely; however the I would consider this inconsistency a bug, hence the fix to ignore the brush entity angles. |
Consistent and descriptive variable names, simplified calculations.
e37853b
to
b42086c
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.
This looks good to me, and I'm alright with including these changes in this PR.
I really appreciate that you optimized the fake worldportals and 3D skybox angles. I didn't know much about what I was doing when I designed them and I was kind of embarrassed by how sloppy their implementation was.
b42086c
to
1ca7558
Compare
…vgui-patch vscript vgui HUD visibility control
I think this might be the best way to handle HUD visibility; this wasn't part of the main PR because I just hadn't thought about this issue for many months.
Global hidehud bits set the visibility of multiple elements at once, which is not ideal at all. For example with the existing custom HUDs (CSGO and TF2) using the previous method, there is no item pickup icons, no zoom or damage indicators.
This allows individual management of every HUD element listed below
Two things I'm uncertain about,
the namespace of this function:
and the capitalisation of 'hud':
PR Checklist
develop
branch OR targets another branch with a specific goal in mind