Mercurial > hg > openttd
diff src/command.cpp @ 8519:0e4b2a37af1f draft
(svn r12094) -Codechange: use DC_BANKRUPT command flag when removing player property to allow further fixes
author | smatz <smatz@openttd.org> |
---|---|
date | Sat, 09 Feb 2008 15:07:31 +0000 |
parents | 83450457346b |
children | 16fe115a9342 |
line wrap: on
line diff
--- a/src/command.cpp +++ b/src/command.cpp @@ -422,6 +422,7 @@ if (_docommand_recursive == 1 && !(flags & DC_QUERY_COST) && + !(flags & DC_BANKRUPT) && res.GetCost() != 0 && !CheckPlayerHasMoney(res)) { goto error; @@ -446,7 +447,7 @@ } /* if toplevel, subtract the money. */ - if (--_docommand_recursive == 0) { + if (--_docommand_recursive == 0 && !(flags & DC_BANKRUPT)) { SubtractMoneyFromPlayer(res); /* XXX - Old AI hack which doesn't use DoCommandDP; update last build coord of player */ if (tile != 0 && IsValidPlayer(_current_player)) {