Mercurial > hg > openttd
changeset 15046:01f8db5ece32 draft
(svn r19663) -Fix: in rare cases, update of signals could be missed
author | smatz <smatz@openttd.org> |
---|---|
date | Sat, 17 Apr 2010 20:21:33 +0000 |
parents | a23bdec8ddcb |
children | d75e147e98d4 |
files | src/command.cpp |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/command.cpp +++ b/src/command.cpp @@ -670,6 +670,9 @@ /* If we're needing more money and we haven't done * anything yet, ask for the money! */ if (_additional_cash_required != 0 && res2.GetCost() == 0) { + /* It could happen we removed rail, thus gained money, and deleted something else. + * So make sure the signal buffer is empty even in this case */ + UpdateSignalsInBuffer(); SetDParam(0, _additional_cash_required); return_dcpi(CommandCost(STR_ERROR_NOT_ENOUGH_CASH_REQUIRES_CURRENCY), false); }