mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
Improved ORPC.
This commit is contained in:
parent
32ec479b78
commit
42b994717d
@ -154,12 +154,18 @@ struct EntityStat {
|
|||||||
} \
|
} \
|
||||||
func(__VA_ARGS__);
|
func(__VA_ARGS__);
|
||||||
|
|
||||||
#define ORPC(func, ...) \
|
#define ORPC(func, ...) \
|
||||||
if (is_inside_tree() && get_tree()->has_network_peer()) { \
|
if (is_inside_tree() && get_tree()->has_network_peer()) { \
|
||||||
if (get_tree()->is_network_server() && get_network_master() != 1) \
|
if (get_tree()->is_network_server()) { \
|
||||||
rpc_id(get_network_master(), #func, ##__VA_ARGS__); \
|
if (get_network_master() != 1) { \
|
||||||
} \
|
rpc_id(get_network_master(), #func, ##__VA_ARGS__); \
|
||||||
func(__VA_ARGS__);
|
} else { \
|
||||||
|
func(__VA_ARGS__); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
} else { \
|
||||||
|
func(__VA_ARGS__); \
|
||||||
|
}
|
||||||
|
|
||||||
#define RPCS(func, ...) \
|
#define RPCS(func, ...) \
|
||||||
if (is_inside_tree() && get_tree()->has_network_peer()) { \
|
if (is_inside_tree() && get_tree()->has_network_peer()) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user