Fix apm and average apm display
This commit is contained in:
@@ -24,7 +24,9 @@ extern uint32 _frame_counter;
|
||||
struct CommandPacket;
|
||||
namespace citymania {
|
||||
extern CommandCost _command_execute_cost;
|
||||
extern bool _automatic_command;
|
||||
void ExecuteCurrentCallback(const CommandCost &cost);
|
||||
void CountEffectiveAction();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -314,6 +316,7 @@ protected:
|
||||
Tret res = Execute(err_message, reinterpret_cast<CommandCallback *>(callback), my_cmd, estimate_only, network_command, tile, args);
|
||||
InternalPostResult(ExtractCommandCost(res), tile, estimate_only, only_sending, err_message, my_cmd);
|
||||
citymania::_command_execute_cost = ExtractCommandCost(res);
|
||||
if (!estimate_only && !only_sending && !citymania::_automatic_command && my_cmd) citymania::CountEffectiveAction();
|
||||
|
||||
if (!estimate_only && !only_sending && callback != nullptr) {
|
||||
if constexpr (std::is_same_v<Tcallback, CommandCallback>) {
|
||||
|
||||
Reference in New Issue
Block a user