1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 05:34:12 +01:00

(svn r23051) [1.1] -Backport from trunk:

- Fix: AI backlog was to short to fully display the backtrace of some AI crashes [FS#4798] (r23012)
- Fix: When the last used server is deleted from the list also clear the last used server if it is the same [FS#4791] (r23011)
- Fix: [NewGRF] Make sure temporary storage is cleared before test and exec runs for DoCommands so NewGRF callbacks cannot change the result between the runs (r22996)
- Fix: [NewGRF] Tile was cleared before the object-placement callback was run, resulting in possible differences in test and exec run [FS#4775] (r22994)
This commit is contained in:
rubidium
2011-10-22 20:45:19 +00:00
parent c1359d6d8a
commit 83d41e122c
4 changed files with 27 additions and 9 deletions

View File

@@ -633,6 +633,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
/* Test the command. */
_cleared_object_areas.Clear();
SetTownRatingTestMode(true);
ClearStorageChanges(false);
res = proc(tile, flags, p1, p2, text);
SetTownRatingTestMode(false);
@@ -672,6 +673,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
/* Actually try and execute the command. If no cost-type is given
* use the construction one */
_cleared_object_areas.Clear();
ClearStorageChanges(false);
CommandCost res2 = proc(tile, flags | DC_EXEC, p1, p2, text);
if (cmd_id == CMD_COMPANY_CTRL) {