--- a/ai_old.c Wed Jul 20 09:49:04 2005 +0000
+++ b/ai_old.c Wed Jul 20 15:29:28 2005 +0000
@@ -1534,15 +1534,16 @@
static bool AiCheckTrackResources(TileIndex tile, const AiDefaultBlockData *p, byte cargo)
{
uint values[NUM_CARGO];
- int w,h;
int rad;
for(;p->mode != 4;p++) if (p->mode == 1) {
TileIndex tile2 = TILE_ADD(tile, ToTileIndexDiff(p->tileoffs));
-
- w = ((p->attr>>1) & 7);
- h = ((p->attr>>4) & 7);
- if (p->attr&1) intswap(w, h);
+ uint w;
+ uint h;
+
+ w = GB(p->attr, 1, 3);
+ h = GB(p->attr, 4, 3);
+ if (p->attr & 1) uintswap(w, h);
if (_patches.modified_catchment) {