(svn r19419) -Codechange: Use failed CommandCost object to retrieve message instead of _error_message.

This commit is contained in:
alberth
2010-03-14 14:36:37 +00:00
parent 6601ecc87a
commit 28b0a3e335
3 changed files with 3 additions and 3 deletions

View File

@@ -511,7 +511,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
/* Only show the error when it's for us. */
StringID error_part1 = GB(cmd, 16, 16);
if (estimate_only || (IsLocalCompany() && error_part1 != 0 && my_cmd)) {
ShowErrorMessage(error_part1, _error_message, WL_INFO, x, y);
ShowErrorMessage(error_part1, res.GetErrorMessage(), WL_INFO, x, y);
}
} else if (estimate_only) {
ShowEstimatedCostOrIncome(res.GetCost(), x, y);