diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index c6533991df..edc4dae3b4 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -401,7 +401,7 @@ bool ScriptObject::ScriptDoCommandHelper if (!estimate_only && networking) ScriptObject::SetLastCommand(EndianBufferWriter::FromValue(args), Tcmd); /* Try to perform the command. */ - Tret res = ::Command::Unsafe((StringID)0, networking ? ScriptObject::GetDoCommandCallback() : nullptr, false, estimate_only, tile, args); + Tret res = ::Command::Unsafe((StringID)0, (!asynchronous && networking) ? ScriptObject::GetDoCommandCallback() : nullptr, false, estimate_only, tile, args); if constexpr (std::is_same_v) { return ScriptObject::DoCommandProcessResult(res, callback, estimate_only, asynchronous);