Add proper support for custom client schemes, HUD layouts, etc. + related changes to HL2 Protagonist System#510
Open
Blixibon wants to merge 4 commits intomapbase-source:developfrom
Conversation
…imations + integrated them into the Protagonist System
…rmor HUD to always appear
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for
clientscheme.res,hudlayout.res, andhudanimations.txtto be overridden in-game by a map, by VScript, or by the HL2 Protagonist System. It also adds support for custom weapon names and sound overrides to the Protagonist System.Mapbase's previous implementation of custom client schemes tried to override
Panel::GetSchemedirectly, which was a bit of a mess and didn't override every part of the scheme (e.g. the fonts). This implementation instead modifies the behavior ofCBaseViewport::ReloadScheme, which is what appliesclientscheme.resand also technically supports the use of a different file. The function has been modified so that, when the scheme differs from the previous one, it re-initializes the HUD and the default settings of each HUD panel. The latter required the addition ofPanel::SetApplyDefaultSettingsto apply the required flag.CBaseViewporthas been modified further to support custom HUD layout and animations as well.These files can be used through the existing implementation of Mapbase's map-specific files (e.g.
<map name>_clientscheme.res) or the exposed VScript functions (e.g.Mapbase.LoadCustomClientSchemeFile("resource/clientscheme_custom.res")). Additionally, the HL2 Protagonist System now has the ability to load these files on a protagonist-by-protagonist basis so that different protagonists have different HUDs.The Protagonist System also now supports custom weapon names and sound overrides to complement custom HUDs.
Some notes regarding this:
PR Checklist
developbranch OR targets another branch with a specific goal in mind