-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draw_ValidateCustomLogo: Minor refactoring & cleanup
- Loading branch information
Showing
1 changed file
with
30 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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
174414d
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.
Custom logos that I had no longer draw due to the refactoring done in this commit. Might be worthwhile checking this.
174414d
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.
@SmilexGamer send me your
{gamedir}/tempdecal.wad
to mail174414d
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.
@s1lentq can I instead send the website which I use to convert images to tempdecal.wad? I used to do my custom logos manually, but the transparency was always a tedious task, so I began using a website.
174414d
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 would be nice to have both
174414d
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.
Okay, I'll send the website (and source code of it) and an example tempdecal.wad.
174414d
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.
A great additional feature would be a CVAR to allow blocking such custom decals, either by blocking them by palette size (block colored) or by size (anything over standard 64x64).
As some number of players exploit this possibility to make irritating very large and colorful custom tempdecals due to an oversight in the check code which was always supposed to only accept single color and maximum of 64x64 sprays.
The original intention is clear by looking the original logos, the additional ones in Half-Life: Further Data, or when making custom sprays by adding them to the "logos" folder. The code transforming BMP to tempdecal.wad works fine and only allows single color and max 64x64 sprites, and only by use of external tools is possible to make much larger sprays and make them multicolor. Thus, large colorful tempdecals is unintended behaviour allowed by shoddy coding in the validation process.
Something like
sv_logos_allow_nonstandard 0/1
or for finer control
sv_logos_allow_largesize 0/1
sv_logos_allow_multicolor 0/1
174414d
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.
You are right, but we have to be careful with such changes. This has been a default behavior that noone questioned for years, so if such cvar is implemented, it should follow default behavior by default.
174414d
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 that has been the design principle the whole time, that by default ReHLDS is just what it says on a tin, a reverse-engineered HLDS and nothing else, just like many other reverse-engineering projects. Every non-default behaviour and fix has been wrapped in either a runtime cvar or compile-time
#ifdef REHLDS_FIXES
. So following that principle, I agree with you, that the default value for allow nonstandard sprays should be 1.