Fix #11: Queue outgoing commands and don't send more than 2 per frame

This commit is contained in:
dP
2021-10-29 02:54:25 +03:00
parent 4df77324fc
commit 3bef49da29
9 changed files with 161 additions and 41 deletions

View File

@@ -30,7 +30,7 @@
#include "table/strings.h"
#include "citymania/cm_blueprint.hpp"
#include "citymania/cm_commands.hpp"
#include "citymania/cm_hotkeys.hpp"
#include "citymania/cm_watch_gui.hpp"
@@ -617,7 +617,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
callback(res, tile, p1, p2, cmd);
}
if (!estimate_only && !only_sending)
citymania::CommandExecuted(res.Succeeded(), tile, p1, p2, cmd);
citymania::HandleCommandExecution(res.Succeeded(), tile, p1, p2, cmd, text);
return res.Succeeded();
}