Fix #9877: GS could trigger 'Cost: 0' cost message (#9878)

This commit is contained in:
Charles Pigott
2022-05-05 19:51:56 +01:00
committed by GitHub
parent 142321da79
commit 146827c458
4 changed files with 7 additions and 4 deletions

View File

@@ -262,7 +262,7 @@ void CommandHelperBase::InternalPostResult(const CommandCost &res, TileIndex til
}
} else if (estimate_only) {
ShowEstimatedCostOrIncome(res.GetCost(), x, y);
} else if (!only_sending && res.GetCost() != 0 && tile != 0 && IsLocalCompany() && _game_mode != GM_EDITOR) {
} else if (!only_sending && tile != 0 && IsLocalCompany() && _game_mode != GM_EDITOR) {
/* Only show the cost animation when we did actually
* execute the command, i.e. we're not sending it to
* the server, when it has cost the local company