Skip to content

Refactor how network tables and prediction is defined - #227

Merged
marchc1 merged 12 commits into
SourceDotNET:mainfrom
ZehMatt:net-overhaul
Oct 23, 2026
Merged

marchc1 merged 12 commits into
SourceDotNET:mainfrom
ZehMatt:net-overhaul

Conversation

@ZehMatt

@ZehMatt ZehMatt commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

I didn't like how that worked, we dont need NetworkName and NetworkVar together, NetworkVar now implies its named. There are a couple corrections I spotted by dumping the prediction tables from the binary and fixed them here as well. I think this is a lot nicer than what it was before, this also makes weapons actually work and correctly predict now and everything else that was broken because it lacked the NetworkVar attribute.

Also this comes with a test finally that validates the CRC32 against the server send tables, so that guards against anything accidentally breaking it, the downside is that whenever GMod changes them we have to adjust the test data but I think that is a small price to pay for guarding correctness.

@Grocel

Grocel commented Oct 22, 2026

Copy link
Copy Markdown

With Rubat tiptoeing around network changes between updates the expected rate of test data adjustment is less than once a year.

@marchc1 marchc1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Something unexpected was that I expected these changes to decrease the line counts significantly, but its really only ~500 lines removed. It is a lot cleaner though. I fear it may be a bit confusing when porting entity code, but we're pretty close to being done with that on the networking side of things, so I can justify this refactoring now

@marchc1
marchc1 merged commit c98010a into SourceDotNET:main Oct 23, 2026
8 checks passed
@ZehMatt
ZehMatt deleted the net-overhaul branch October 23, 2026 01:12
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.

3 participants