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

SunSpreadAngle must be capitalized #274

Open
ozxybox opened this issue Aug 10, 2024 · 4 comments
Open

SunSpreadAngle must be capitalized #274

ozxybox opened this issue Aug 10, 2024 · 4 comments
Labels
bug done Fixed/implemented for next release

Comments

@ozxybox
Copy link
Contributor

ozxybox commented Aug 10, 2024

It turns out, this keyvalue, SunSpreadAngle, must always be properly capitalized for it to be read by VRAD. By having it lowercase in the FGD, the final result will be a lowercased keyvalue in the entity lump, which VRAD skips over.

sunspreadangle(float) : "SunSpreadAngle" : 5 : "The angular extent of the sun for casting soft shadows. Higher numbers are more diffuse. 5 is a good starting value."

sunspreadangle(float) : "SpreadAngle" : 0 : "The angular extent of the light for casting soft shadows. Higher numbers are more diffuse. 5 is a good starting value."

The variable is read from here:
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/utils/vrad/lightmap.cpp#L1483C1-L1483C64

The case-sensitive strcmp that checks it is here:
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/utils/vrad/lightmap.cpp#L1470C1-L1470C31

@TeamSpen210
Copy link
Owner

That's quite dumb. I think I'll also add a postcompiler transform to adjust the casing as well then, to fix this issue.

@ozxybox
Copy link
Contributor Author

ozxybox commented Aug 11, 2024

Related, does HA always emit (or intake when importing) lowercase keyvalue names?

@TeamSpen210
Copy link
Owner

Nah, srctools does lookups case-insensitively, but preserves the casing used when it’s initially set/parsed. I need to revamp this though, currently it’s directly exposed as the keys dict meaning it has to just loop over all the keys each time…

@ozxybox
Copy link
Contributor Author

ozxybox commented Aug 11, 2024

Ah okay, thanks! Was wondering as I was futzing around with it the other day

@TeamSpen210 TeamSpen210 added bug done Fixed/implemented for next release labels Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug done Fixed/implemented for next release
Projects
None yet
Development

No branches or pull requests

2 participants