From 833032adc09ce95c68d4a4b412221a0b3f88e670 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 14 Nov 2005 08:09:57 +0000 Subject: (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT --- ai/trolly/trolly.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ai/trolly') diff --git a/ai/trolly/trolly.c b/ai/trolly/trolly.c index c40b0faef..f57644b10 100644 --- a/ai/trolly/trolly.c +++ b/ai/trolly/trolly.c @@ -781,7 +781,8 @@ static void AiNew_State_FindDepot(Player *p) // To make the depot stand in the middle of the route, we start from the center.. // But first we walk through the route see if we can find a depot that is ours // this keeps things nice ;) - int g, i, j, r; + int g, i, r; + uint j; TileIndex tile; assert(p->ainew.state == AI_STATE_FIND_DEPOT); @@ -796,7 +797,7 @@ static void AiNew_State_FindDepot(Player *p) // We found a depot, is it ours? (TELL ME!!!) if (IsTileOwner(tile + TileOffsByDir(j), _current_player)) { // Now, is it pointing to the right direction......... - if ((_m[tile + TileOffsByDir(j)].m5 & 3) == (j ^ 2)) { + if (GB(_m[tile + TileOffsByDir(j)].m5, 0, 2) == (j ^ 2)) { // Yeah!!! p->ainew.depot_tile = tile + TileOffsByDir(j); p->ainew.depot_direction = j ^ 2; // Reverse direction -- cgit v1.2.3-54-g00ecf