diff --git a/Config/DefaultEditorPerProjectUserSettings.ini b/Config/DefaultEditorPerProjectUserSettings.ini index 7b233817..17a22783 100644 --- a/Config/DefaultEditorPerProjectUserSettings.ini +++ b/Config/DefaultEditorPerProjectUserSettings.ini @@ -15,3 +15,6 @@ AutoSaveWarningInSeconds=0 [/Script/Integration.lxProjectSettings] ActiveServer=/Game/Luprex/KnownServers/SS_Standalone.SS_Standalone +[/Script/Integration.lxEditorSettings] +ActiveServer=/Game/Luprex/KnownServers/SS_Localhost.SS_Localhost + diff --git a/Content/Widgets/WB_Hotkeys.uasset b/Content/Widgets/WB_Hotkeys.uasset index 7a8a67ec..473adc6a 100644 --- a/Content/Widgets/WB_Hotkeys.uasset +++ b/Content/Widgets/WB_Hotkeys.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fe72ee8660c1dfa51a742e03674011d01043485571d13a4b1b590ff329d3f770 -size 295810 +oid sha256:fc8e4a6da6ac8c663f90c9a2252121b28d2c52400399f83d40df7c4e7d7d4d97 +size 299119 diff --git a/luprex/cpp/core/lpxclient.cpp b/luprex/cpp/core/lpxclient.cpp index 5d19c262..5c5c79b6 100644 --- a/luprex/cpp/core/lpxclient.cpp +++ b/luprex/cpp/core/lpxclient.cpp @@ -18,6 +18,8 @@ public: PrintChanneler print_channeler_; eng::vector delayed_invocations_; lua_State *lua_syntax_checker_; + eng::string auto_reconnect_target_; + double auto_reconnect_time_ = 0.0; public: LpxClient(EngineWrapper *w) : wrapper_(w) { @@ -58,6 +60,10 @@ public: // Clear any saved invocations delayed_invocations_.clear(); + + // Clear auto-reconnect state. + auto_reconnect_target_.clear(); + auto_reconnect_time_ = 0.0; } void set_initial_state_standalone() { @@ -83,6 +89,10 @@ public: // Clear any saved invocations delayed_invocations_.clear(); + + // Clear auto-reconnect state. + auto_reconnect_target_.clear(); + auto_reconnect_time_ = 0.0; } // When the world is in synchronous mode, there's no @@ -111,8 +121,9 @@ public: void disconnect_and_reconnect() { if (channel_) { - eng::string target = channel_->target(); - set_initial_state_connect(target); + auto_reconnect_target_ = channel_->target(); + auto_reconnect_time_ = get_clock() + 5.0; + channel_.reset(); } } @@ -257,6 +268,10 @@ public: } world_to_asynchronous(); } + } else { + if ((!auto_reconnect_target_.empty()) && (get_clock() > auto_reconnect_time_)) { + set_initial_state_connect(auto_reconnect_target_); + } } set_have_prints(print_channeler_.have_prints(world_->get_printbuffer(actor_id_)));