Skip to content
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

Handle Color32 variants #24

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

rtldg
Copy link
Contributor

@rtldg rtldg commented Jan 8, 2025

With entities like math_colorblend, a color32 value can be passed in non-string form. This shows up on surf_classics (CS:S) for example:

{
"origin" "-7872 14264 10048"
"targetname" "blend_1R"
"spawnflags" "1"
"inmax" "100"
"colormin" "255 255 255"
"colormax" "255 0 0 0"
"classname" "math_colorblend"
"hammerid" "37178"
"OutColor" "Brush_Color1,Color,,0,-1"
"OutColor" "Brush_Color2,Color,,0,-1"
"OutColor" "Brush_Color3,Color,,0,-1"
}

Brush_Color 1-3 are func_brush entities that receive the color.
You can go to the ramps at '-15122 15418 14992' to see the color changes (or the crash if you spawn in without using this PR).

I recall an unimportant map, with a sun entity, that crashed when using eventqueuefix, and it might also be color32 related. (I don't remember the map's name to check though)

With entities like `math_colorblend`, a `color32` value can be passed in non-string form.
This shows up on `surf_classics` (CS:S) for example:
```
{
"origin" "-7872 14264 10048"
"targetname" "blend_1R"
"spawnflags" "1"
"inmax" "100"
"colormin" "255 255 255"
"colormax" "255 0 0 0"
"classname" "math_colorblend"
"hammerid" "37178"
"OutColor" "Brush_Color1,Color,,0,-1"
"OutColor" "Brush_Color2,Color,,0,-1"
"OutColor" "Brush_Color3,Color,,0,-1"
}
```
`Brush_Color` 1-3 are `func_brush` entities that receive the color.
You can go to the ramps at '-15122 15418 14992' to see the color changes (or the crash if you spawn in without using this PR).

I recall an unimportant map, with a sun entity, that crashed when using eventqueuefix, and it might also be color32 related.
(I don't remember the map's name to check though)
@hermansimensen hermansimensen merged commit 7744bf4 into hermansimensen:main Jan 10, 2025
1 check failed
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.

2 participants