mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
[Net] Single rpc annotation. "sync" no longer part of mode.
- Move the "sync" property for RPCs to RPCConfig.
- Unify GDScript annotations into a single one:
- `@rpc(master)` # default
- `@rpc(puppet)`
- `@rpc(any)` # former `@remote`
- Implement three additional `@rpc` options:
- The second parameter is the "sync" option (which also calls the
function locally when RPCing). One of "sync", "nosync".
- The third parameter is the transfer mode (reliable, unreliable,
ordered).
- The third parameter is the channel (unused for now).
This commit is contained in:
@@ -146,14 +146,5 @@
|
||||
<constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode">
|
||||
Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master].
|
||||
</constant>
|
||||
<constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode">
|
||||
Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword.
|
||||
</constant>
|
||||
<constant name="RPC_MODE_MASTERSYNC" value="5" enum="RPCMode">
|
||||
Behave like [constant RPC_MODE_MASTER] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword.
|
||||
</constant>
|
||||
<constant name="RPC_MODE_PUPPETSYNC" value="6" enum="RPCMode">
|
||||
Behave like [constant RPC_MODE_PUPPET] but also make the call or property change locally. Analogous to the [code]puppetsync[/code] keyword.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
||||
Reference in New Issue
Block a user