-The extension works with entity properties, the same that you're used to with the `SetEntProp[Type]` functions, except it doesn't set the entity property itself, but instead modifies the sent value. Since not all properties are networkable, the extension allows you to verify if an entity property is networkable through `HasNetworkableProp`. After you know a property is networkable, you can set its sent value with `SetSendVar`, replace it only if its already going to be sent with `ReplaceSendVar`, or prevent it from being sent with `OmitSendVar`. `SetSendVar` and `ReplaceSendVar` take a custom value that are stored in a handle. These handles can be created with the `SendVar[Type]` functions, where `Type` is the sent type of the property. All handles are automatically freed at the end of the frame, so you can use `SendVar[Type]` directly in the argument of `[Set/Replace]SendVar` without worry. Some properties go through a conversion function called a proxy that might even change its sent type, so make sure to use the proxy output instead if it exists. The extension provides a few such proxies named `SendProxy[Type]` for convenience. It is not guaranteed that a client will receive an update every frame (`cl_updaterate` < tickrate), so the the extension will remember every edit until then to make sure no action ends up missing its mark. It is possible get notified when such a client update will happen by subscribing to the forward `OnCheckTransmit`. The forward can also be used to control what entities get sent to the client in cases where hiding or transmitting an entity through walls is desirable. The extension additionally includes the forwards `OnSendClientMessages` and `OnSendClientMessagesPost` to let you know whenever the server is preparing to send out updates to clients and when it is done doing so.
0 commit comments