You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Brand new networked multiplayer
This commit is contained in:
@@ -250,7 +250,7 @@ void GDScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) {
|
||||
#endif
|
||||
|
||||
|
||||
void GDScript::get_method_list(List<MethodInfo> *p_list) const {
|
||||
void GDScript::get_script_method_list(List<MethodInfo> *p_list) const {
|
||||
|
||||
for (const Map<StringName,GDFunction*>::Element *E=member_functions.front();E;E=E->next()) {
|
||||
MethodInfo mi;
|
||||
@@ -1300,6 +1300,46 @@ ScriptLanguage *GDInstance::get_language() {
|
||||
return GDScriptLanguage::get_singleton();
|
||||
}
|
||||
|
||||
GDInstance::RPCMode GDInstance::get_rpc_mode(const StringName& p_method) const {
|
||||
|
||||
const GDScript *cscript = script.ptr();
|
||||
|
||||
while(cscript) {
|
||||
const Map<StringName,GDFunction*>::Element *E=cscript->member_functions.find(p_method);
|
||||
if (E) {
|
||||
|
||||
if (E->get()->get_rpc_mode()!=RPC_MODE_DISABLED) {
|
||||
return E->get()->get_rpc_mode();
|
||||
}
|
||||
|
||||
}
|
||||
cscript=cscript->_base;
|
||||
}
|
||||
|
||||
return RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
GDInstance::RPCMode GDInstance::get_rset_mode(const StringName& p_variable) const {
|
||||
|
||||
const GDScript *cscript = script.ptr();
|
||||
|
||||
while(cscript) {
|
||||
const Map<StringName,GDScript::MemberInfo>::Element *E=cscript->member_indices.find(p_variable);
|
||||
if (E) {
|
||||
|
||||
if (E->get().rpc_mode) {
|
||||
return E->get().rpc_mode;
|
||||
}
|
||||
|
||||
}
|
||||
cscript=cscript->_base;
|
||||
}
|
||||
|
||||
return RPC_MODE_DISABLED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void GDInstance::reload_members() {
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
@@ -1811,6 +1851,10 @@ void GDScriptLanguage::get_reserved_words(List<String> *p_words) const {
|
||||
"pass",
|
||||
"return",
|
||||
"while",
|
||||
"remote",
|
||||
"sync",
|
||||
"master",
|
||||
"slave",
|
||||
0};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user