(svn r9954) -Fix [FS#811]: trolley AI crashed when trying to determine what the roadbits are.
This commit is contained in:
@@ -284,9 +284,9 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr
|
|||||||
dir = 0;
|
dir = 0;
|
||||||
} else {
|
} else {
|
||||||
// It already has road.. check if we miss any bits!
|
// It already has road.. check if we miss any bits!
|
||||||
if ((GetRoadBits(ctile, ROADTYPE_ROAD) & dir) != dir) {
|
if ((GetAnyRoadBits(ctile, ROADTYPE_ROAD) & dir) != dir) {
|
||||||
// We do miss some pieces :(
|
// We do miss some pieces :(
|
||||||
dir &= ~GetRoadBits(ctile, ROADTYPE_ROAD);
|
dir &= ~GetAnyRoadBits(ctile, ROADTYPE_ROAD);
|
||||||
} else {
|
} else {
|
||||||
dir = 0;
|
dir = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user