RobustToolbox
RobustToolbox copied to clipboard
Compress large networked entity events
This PR makes networked EntityEventArgs get automatically compressed if they are over 1024 bytes (game states currently get compressed above 256 bytes). This is probably useful for systems that consistently send easily compressible data (e.g., gas tile overlay), or just send large messages (e.g., some admin/debug overlays).
I'm somewhat unsure about what to do in the case of multi-threaded message sending. RaiseNetworkEvent now takes in an optional ZStdCompressionContext, so callers could use something like the PvsThreadResources pool, but it defaults to using a ThreadLocal<ZStdCompressionContext>.
This PR also removes the EntityMessageType enum, seeing as it was unused, and I'm not sure what it was event meant to be used for.
holy fucking shit sensor monitoring console let's fricking go.
Stale