(svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky.

This commit is contained in:
darkvater
2005-01-04 17:11:03 +00:00
parent 88b8a01da6
commit 6edb21231e
13 changed files with 39 additions and 7 deletions

View File

@@ -398,6 +398,8 @@ int32 CmdDestroyIndustry(int x, int y, uint32 flags, uint32 p1, uint32 p2)
Industry *i = DEREF_INDUSTRY((uint16)p1);
Town *t = ClosestTownFromTile(tile, (uint)-1); // find closest town to penaltize (ALWAYS penaltize)
SET_EXPENSES_TYPE(EXPENSES_OTHER);
// check if you're allowed to remove the industry. Minimum amount
// of ratings to remove the industry depends on difficulty setting
if (!CheckforTownRating(tile, flags, t, INDUSTRY_REMOVE))