mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r9954) -Fix [FS#811]: trolley AI crashed when trying to determine what the roadbits are.
This commit is contained in:
parent
1b33f19877
commit
53380fc047
@ -284,9 +284,9 @@ static void AyStar_AiPathFinder_GetNeighbours(AyStar *aystar, OpenListNode *curr
|
||||
dir = 0;
|
||||
} else {
|
||||
// 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 :(
|
||||
dir &= ~GetRoadBits(ctile, ROADTYPE_ROAD);
|
||||
dir &= ~GetAnyRoadBits(ctile, ROADTYPE_ROAD);
|
||||
} else {
|
||||
dir = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user