Skip to content

Conversation

@SirYodaJedi
Copy link

A few doors weren't changed to use an explicitly defined WAV or soundscript instead of a button index for the locked/unlocked sounds. The existing fallback behavior hardcoded such doors to use "buttons/button2.wav", instead of the proper button soundscript that matches the array that GoldSrc used; this edit uses the code from buttons.cpp to properly chose the correct soundscript to restore the "designer's original selection".

Rather than porting HLSDK code (which is technically against the license for both SDKs, for some reason), this PR duplicates a function from buttons.cpp. While I probably could've #included buttons.cpp, I don't trust that that wouldn't have broken things. HLSDK made the function accessible from anything that #includes cbase.h, which seems overkill.

This same fix can be applied to HLS, but that is a separate Git branch now, so it can't be applied in the same PR. In the unlikely event that this PR gets pulled upstream, make sure the cherry-pick it for the singleplayer branch as well.

A few doors weren't changed to use an explicitly defined WAV or soundscript instead of a button index for the locked/unlocked sounds. The existing fallback behavior hardcoded such doors to use "buttons/button2.wav", instead of the proper button soundscript that matches the array that GoldSrc used; this edit uses the code from buttons.cpp to properly chose the correct soundscript to restore the "designer's original selection".
@SirYodaJedi
Copy link
Author

SirYodaJedi commented Dec 9, 2025

Note for SDK mod programmers: if you want to support the legacy GoldSrc-style locked/unlocked door sound behavior in your mod, just edit or remove the ifdefs in this PR.

@Bitl
Copy link
Contributor

Bitl commented Dec 10, 2025

Just read through both the Source SDK and HL1 SDK licences and nothing really comes out to me that says you can't port HL1 SDK code to the Source SDK and vice versa. The licenses only state that the code can be used to create mods for the respective engines (as long as the mods are free). There's no explicit guidelines against porting the code to different engines, and both licenses link to the Steam Subscriber Agreement which doesn't have any statements on the matter. Even then, Source mods have used HL1's SDK code for NPCs and such for years, so I don't find any issues with porting HL1 code.

@SirYodaJedi
Copy link
Author

SirYodaJedi commented Dec 10, 2025

The licenses only state that the code can be used to create mods for the respective engines (as long as the mods are free).

It states that you can use it to create mods on the respective engine. It does not give any permissions regarding porting, which I'm sure a lawyer would say means you have none.

Even then, Source mods have used HL1's SDK code for NPCs and such for years, so I don't find any issues with porting HL1 code.

I don't think Valve cares outside of cash cows as long as they stay within the Valve ecosystem (I'm sure the mod version of Black Mesa used HLSDK code), but some projects (ex: Mapbase) err on the safe side.

Regardless, the reason this particular PR doesn't use HLSDK code is unrelated to license issues, but rather is down to being a more "proper" (and certainly cleaner) solution.

@Bitl
Copy link
Contributor

Bitl commented Dec 11, 2025

Regardless, the reason this particular PR doesn't use HLSDK code is unrelated to license issues, but rather is down to being a more "proper" (and certainly cleaner) solution.

Fair

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