mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 17:29:24 +08:00
add: pause lua state when setting fast stage move duration
This commit is contained in:
@@ -106,7 +106,9 @@ CrackerServer::CrackerServer() {
|
||||
|
||||
Post("/enable_fast_stage_move", [](const httplib::Request& req, httplib::Response& res) {
|
||||
try {
|
||||
Cracker::Instance().enable_fast_stage_move();
|
||||
auto& ins = Cracker::Instance();
|
||||
ins.fast_stage_move_pause(true);
|
||||
ins.enable_fast_stage_move();
|
||||
} catch (std::exception& e) {
|
||||
SPDLOG_ERROR("Enable fast stage move failed: {}", e.what());
|
||||
res.status = 500;
|
||||
@@ -117,7 +119,9 @@ CrackerServer::CrackerServer() {
|
||||
|
||||
Post("/disable_fast_stage_move", [](const httplib::Request& req, httplib::Response& res) {
|
||||
try {
|
||||
Cracker::Instance().disable_fast_stage_move();
|
||||
auto& ins = Cracker::Instance();
|
||||
ins.fast_stage_move_pause(true);
|
||||
ins.disable_fast_stage_move();
|
||||
} catch (std::exception& e) {
|
||||
SPDLOG_ERROR("Disable fast stage move failed: {}", e.what());
|
||||
res.status = 500;
|
||||
|
||||
Reference in New Issue
Block a user