[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:
@ -3472,15 +3472,6 @@ MultiplayerAPI::RPCMode CSharpScript::_member_get_rpc_mode(IMonoClassMember *p_m
|
||||
if (p_member->has_attribute(CACHED_CLASS(PuppetAttribute))) {
|
||||
return MultiplayerAPI::RPC_MODE_PUPPET;
|
||||
}
|
||||
if (p_member->has_attribute(CACHED_CLASS(RemoteSyncAttribute))) {
|
||||
return MultiplayerAPI::RPC_MODE_REMOTESYNC;
|
||||
}
|
||||
if (p_member->has_attribute(CACHED_CLASS(MasterSyncAttribute))) {
|
||||
return MultiplayerAPI::RPC_MODE_MASTERSYNC;
|
||||
}
|
||||
if (p_member->has_attribute(CACHED_CLASS(PuppetSyncAttribute))) {
|
||||
return MultiplayerAPI::RPC_MODE_PUPPETSYNC;
|
||||
}
|
||||
|
||||
return MultiplayerAPI::RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user