beyond-all-reason / spring

A powerful free cross-platform RTS game engine
https://beyond-all-reason.github.io/spring/
Other
178 stars 95 forks source link

Improve and fix documentation for AutoHost packets #1501

Closed p2004a closed 1 month ago

p2004a commented 2 months ago

The current descriptions of packets were heavily lying about the actual content of the packets. The new description was heavily tested in preparation of https://github.com/p2004a/recoil-host/commit/ab2206f9e2b515f096a0687a1a61b7d7023a437c on packed dumps from live games and of course reading engine source.

sprunk commented 1 month ago

I know for a fact that 255 is not dropped, and is designed to be the "send to autohost" ID, because ZK uses it and it works (send gameside, receive autohost-side).

Not being seen by any player etc is the point, since a message with this ID is for the autohost. If this PR was about documenting the "usual" network protocol it would arguably be fine to skip it, but it's about the autohost protocol so documenting the "send only to autohost" ID is imo important.

p2004a commented 1 month ago

Yes, in my initial reading of the code I made a mistake and inferred that those are dropped.

Thank you for additional explanation, and showing precedence in ZK, I agree it's good to document it as value designed for this purpose. Fixed I believe.