Skip to content

Add A2S_Rules fix for CS:GO to CStrike extension. #614

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

Merged
merged 15 commits into from
Mar 8, 2021
Merged

Conversation

psychonic
Copy link
Member

This has been discussed a bit back and forth on IRC. I'm still not 100% sold on the idea, but here's what an implementation would look like. It's not too bad.

This would also fix our plugin stats for CS:GO.

@Drifter321
Copy link
Member

Looks good to me. My only concern is the additional gamedata but its minimal and very easy to find.

@KyleSanderson
Copy link
Member

This changes the max MTU size and when we talked about this when the situation was more "emotional", lets say, this is changing limits the game has defined. For whatever reason Valve still believes limiting the maximum MTU is a good idea, we should respect that (our positions have essentially inversed ;) ).

The solution at that time was to scrap querying servers, and instead do a periodic upload of server data back to an AM WebAPI to do stats. This is a lot more work as there's backend changes, but it was the path forward however many years ago we discussed this.

I'm flexible, I see some SW.ext code in there and that's totally fine, but we're not only changing their MTU on rules inquiries, but on all network traffic.

@psychonic
Copy link
Member Author

but we're not only changing their MTU on rules inquiries, but on all network traffic.

That is not true.

This isn't changing it on all network traffic. The check only affects outbound, connectionless packets. No netchannel traffic is affected. Also, CS:GO is the only engine branch with this check, despite most of the other logic around it being identical to others.

@peace-maker
Copy link
Member

You could add a hook on host_rules_show and only change the maxMTU and set the keyvalues on steam if it's enabled.

@psychonic
Copy link
Member Author

I had considered that. There's just minimal gain if it isn't "fixed" to match all other games by default, still requiring manual action similar to how it does as-is.

@psychonic
Copy link
Member Author

I just realized that I may have misunderstood what you were saying. You didn't mention changing the default, just not making the changes - doing anything, if it is disabled. That's a good idea!

@KyleSanderson
Copy link
Member

Can we merge this?

@psychonic
Copy link
Member Author

I want to do what @peace-maker suggested first, only having it enabled when host_rules_show is true, but haven't had the time yet.

@Drifter321
Copy link
Member

I had a look at this today, the original value should probably be compared to make sure its the value it should be before we start patching incorrect bytes. This way we can identify if an offset changed easier besides a random crash.

@Drifter321
Copy link
Member

Not tested but implemented the change. Compiles locally but fails with ambuild atm needs to be looked at. Regarding my previous crash i totally forgot the signature contained the actual patched bytes so we should be fine without checking. The gamedata also still seems to be good.

Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides not aging well, this is still a very desired patch to do in SourceMod, not only to reenable plugin stats for CSGO servers, but allow custom tools to access the convars with the NOTIFY flag again as well.

@KyleSanderson
Copy link
Member

@psychonic @Drifter321 what's the skinny on this one?

Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The branch is up to date again and ready to be merged. I've tested on windows and the game rule query is nice and useful.

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.

4 participants