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

Add support for cross-game compatibility #252

Open
rtxa opened this issue Oct 8, 2024 · 4 comments
Open

Add support for cross-game compatibility #252

rtxa opened this issue Oct 8, 2024 · 4 comments

Comments

@rtxa
Copy link

rtxa commented Oct 8, 2024

If server is using ReHLDS, one of the commits rehlds/ReHLDS@0c5ce53 rehlds/ReHLDS#975 allow players to join servers from different games it client has set in his setinfo _gd with the name of the mod you're playing. This requires client-support to automatically set this. In theory, this should allow players on HL to play servers from AG or viceversa, considering that both games shares almost the same messages, and BHL already has support for AG messages.

There are some drawbacks, like not having available the server-list from AG if playing from HL, requiring to join manually using connect. Perhaps usings a custom server browser would allow to circumvent this.

Still, I haven't figure out yet how to trick the client to join the server even with setinfo _gd <MODNAME> already set, throwing "Server is running game <MODNAME>. Restart in that game to connect".

If you want to join HL servers from AG, you just need to set setinfo _gd ag.
And if you want to join AG servers from HL, you just need to set setinfo _gd valve.

PD: Also I notice, it's not neccesary to remove setinfo _gd, it allows to join both HL and AG servers.

@Safety1st
Copy link

I haven't figure out yet how to trick the client to join the server even with different game

You just need to tell server what kind of gamedir it should send by means of setinfo: put setinfo _gd ag if you connect with AG mod to HL server or setinfo _gd valve when vice versa. To connect to AG servers having sv_pure 1 from HL it is also required to have a valid dlls\ag.dll in valve folder.

@rtxa
Copy link
Author

rtxa commented Oct 8, 2024

I haven't figure out yet how to trick the client to join the server even with different game

You just need to tell server what kind of gamedir it should send by means of setinfo: put setinfo _gd ag if you connect with AG mod to HL server or setinfo _gd valve when vice versa. To connect to AG servers having sv_pure 1 from HL it is also required to have a valid dlls\ag.dll in valve folder.

Sure, already did that, but is not enough so maybe something else in the client-side needs to be modified. Server-side has already done his part (I guess). Perhaps tmp64 can figure out why.

@Safety1st
Copy link

On AIMaster servers it was enough :)

@rtxa
Copy link
Author

rtxa commented Oct 8, 2024

On AIMaster servers it was enough :)

My bad, it does work, I was doing it the wrong way (I though you need to match setinfo _gd with the server mod name you're joining, but instead you need to match it with your current game dir), thank you. I guess what's left now it to do this automatically.

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

No branches or pull requests

2 participants