From 0c5d61bd56cb8ec4c2caa8aadb9c397c6931b544 Mon Sep 17 00:00:00 2001 From: pasky Date: Sun, 27 Mar 2005 00:28:14 +0000 Subject: (svn r2080) - Fix: [OldAI] p->ai.state_counter was uint16 but could hold a tile index, therefore overflowing - changed that to uint32 and bumped the savegame revision to 32. It *MIGHT* close bug 1151374 - it certainly caused AI to stop building anything sometimes. - While at it, use TileIndex as the tile index type in AiRemovePlayerRailOrRoad() and AiStateRemoveTrack(). - Make the number of tiles scanned 4*MapSizeX() instead of 1000. It *MIGHT* close bug 1116614. --- player.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player.h') diff --git a/player.h b/player.h index 2c93c2b0e..2fc8fd89b 100644 --- a/player.h +++ b/player.h @@ -27,7 +27,7 @@ typedef struct AiBuildRec { typedef struct PlayerAI { byte state; byte tick; // Used to determine how often to move - uint16 state_counter; + uint32 state_counter; // Can hold tile index! uint16 timeout_counter; byte state_mode; -- cgit v1.2.3-54-g00ecf