diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-01 20:22:02 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-01 20:31:42 -0300 |
commit | 9e745b920fec25f1088ae0377a8d87a87136a5f7 (patch) | |
tree | 67c35840fb0eee8b380fafdbe46b696925d0f1fd /core/script_debugger_remote.cpp | |
parent | 45752eaae4a97b93c794651aa1b8dfec3c4f4d95 (diff) | |
download | redot-engine-9e745b920fec25f1088ae0377a8d87a87136a5f7.tar.gz |
Ability to reload scripts on running game
Diffstat (limited to 'core/script_debugger_remote.cpp')
-rw-r--r-- | core/script_debugger_remote.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 011b1f78a0..99d1e22c07 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -291,6 +291,8 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script,bool p_can_continue) { _set_object_property(cmd[1],cmd[2],cmd[3]); + } else if (command=="reload_scripts") { + reload_all_scripts=true; } else if (command=="breakpoint") { bool set = cmd[3]; @@ -698,7 +700,8 @@ void ScriptDebuggerRemote::_poll_events() { profiling=false; _send_profiling_data(false); print_line("PROFILING END!"); - + } else if (command=="reload_scripts") { + reload_all_scripts=true; } else if (command=="breakpoint") { bool set = cmd[3]; @@ -863,6 +866,14 @@ void ScriptDebuggerRemote::idle_poll() { } } + if (reload_all_scripts) { + + for(int i=0;i<ScriptServer::get_language_count();i++) { + ScriptServer::get_language(i)->reload_all_scripts(); + } + reload_all_scripts=false; + } + _poll_events(); } @@ -1012,6 +1023,7 @@ ScriptDebuggerRemote::ScriptDebuggerRemote() { profile_info_ptrs.resize(profile_info.size()); profiling=false; max_frame_functions=16; + reload_all_scripts=false; } |