1
0
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:
0O0o0oOoO00
2025-11-21 22:24:42 +08:00
parent 550f852dac
commit bd6aeb6fef
4 changed files with 38 additions and 6 deletions

View File

@@ -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;