Skip to content

Fix Load Failure on The Ship#254

Merged
Kenzzer merged 1 commit intoalliedmodders:masterfrom
caxanga334:fix-252
Jan 19, 2026
Merged

Fix Load Failure on The Ship#254
Kenzzer merged 1 commit intoalliedmodders:masterfrom
caxanga334:fix-252

Conversation

@caxanga334
Copy link
Copy Markdown
Contributor

Description

Fixes #252

The Ship's tier0 DLL doesn't export CommandLine_Tier0.

This might not be the best fix since these changes needs to be copied to any file using tier0/icommandline.h.
At the moment there are only two files.

@Kenzzer
Copy link
Copy Markdown
Member

Kenzzer commented Jan 6, 2026

Why isn't this fixed in the hl2sdks instead ? Could you provide more details ?

@caxanga334
Copy link
Copy Markdown
Contributor Author

It was originally fixed this way (and still is).
I just copied the fix from one file to another that needs it.

Also technically speaking, there is no hl2sdk that matches The Ship's engine as it's running on an older than Episode 1 engine.
Metamod even has a runtime check for this.

@tschumann
Copy link
Copy Markdown
Contributor

tschumann commented Jan 8, 2026 via email

@tschumann
Copy link
Copy Markdown
Contributor

tschumann commented Jan 13, 2026 via email

@Kenzzer
Copy link
Copy Markdown
Member

Kenzzer commented Jan 13, 2026

It was originally fixed this way (and still is). I just copied the fix from one file to another that needs it.

Alright if there's a precedent. Then that's good enough for me.

Also technically speaking, there is no hl2sdk that matches The Ship's engine as it's running on an older than Episode 1 engine. Metamod even has a runtime check for this.

That's not the issue I was having. My problem stands with #if SOURCE_ENGINE < SE_ORANGEBOX I don't like that an abitrary amount of sdks are edited and suddenly have DLL_IMPORT ICommandLine *CommandLine();, we have to actually be sure the export is there for all the games that would match those sdk branches. Which is in this case just dark messiah and episode one branches. I'm willing to accept this blindly, but this is why I initially asked why the hl2sdks aren't edited instead. As we could review the changes for each branch and actually ensure we aren't breaking anything.

@Kenzzer
Copy link
Copy Markdown
Member

Kenzzer commented Jan 13, 2026

I'm going to let this sit for a week before merging, maybe psychonic will merge earlier/give hindsights.

As an additional thought, I'm wondering why this export/import was missing from the initial sdk. Its presence seems very old, yet not old enough for our initial mirror to have it ?

Edit: Pushing the reasoning further if compilation isn't failing from that change, then it necessarily implies that the tier0.lib file committed on ep1 & darkm has that export. Yet its export/import definition would be missing from the sdk headers ? I'm not doubting the discrepancy existence, but I'm very confused how something like this went unnoticed.

@Kenzzer
Copy link
Copy Markdown
Member

Kenzzer commented Jan 13, 2026

Answering my own problem.

Yet its export/import definition would be missing from the sdk headers ? I'm not doubting the discrepancy existence, but I'm very confused how something like this went unnoticed.

https://github.com/alliedmodders/hl2sdk/blob/episode1/public/tier0/icommandline.h#L52

The definition exists. But its governed by VSTDLIB_BACKWARD_COMPAT, wouldn't we want to enable that for ep1 instead ?

@caxanga334
Copy link
Copy Markdown
Contributor Author

https://github.com/alliedmodders/hl2sdk/blob/episode1/public/tier0/icommandline.h#L52

The definition exists. But its governed by VSTDLIB_BACKWARD_COMPAT, wouldn't we want to enable that for ep1 instead ?

This might not be a good idea as it's used in other places. IE: https://github.com/alliedmodders/hl2sdk/blob/7e89b69293885eeffb3f493db2e5d16923db913c/public/tier1/strtools.h#L286-L288

I did test defining VSTDLIB_BACKWARD_COMPAT and MM:S fails to compile due to:

D:\work\alliedmodders\hl2sdk-episode1\public\tier1\utlvector.h(360): error C3861: 'Q_memmove': identifier not found

@Kenzzer
Copy link
Copy Markdown
Member

Kenzzer commented Jan 13, 2026

It was worth trying. Welp let's merge this.

@Kenzzer Kenzzer merged commit 362db2c into alliedmodders:master Jan 19, 2026
4 checks passed
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.

[Bug]: Metamod 2.0 fails to load on The Ship

3 participants