diff options
author | smatz <smatz@openttd.org> | 2010-04-17 20:21:33 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2010-04-17 20:21:33 +0000 |
commit | 1f963aed43db64490faa242cc2acce9f08c42f68 (patch) | |
tree | 0f5c9a4999ff284ae5bccd3a4f1af7fa037a6994 | |
parent | 320dcc7d07eace1af0ddfa1a7f6528a2497eb36a (diff) | |
download | openttd-1f963aed43db64490faa242cc2acce9f08c42f68.tar.xz |
(svn r19663) -Fix: in rare cases, update of signals could be missed
-rw-r--r-- | src/command.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp index 6fcb1f29e..f2baa2ff6 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -670,6 +670,9 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, /* 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); } |