Merge branch 'v14'

This commit is contained in:
dP
2025-09-04 23:08:10 +05:00
24 changed files with 478 additions and 382 deletions

View File

@@ -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();
}
/**
@@ -304,6 +306,7 @@ protected:
Tret res = Execute(err_message, reinterpret_cast<CommandCallback *>(reinterpret_cast<void(*)()>(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>) {