src/ai/trolly/build.cpp
changeset 6946 a48b23f1cc8a
parent 6943 1914f26aee04
child 6950 14ecb0acdfb4
equal deleted inserted replaced
6945:210e7150bf17 6946:a48b23f1cc8a
   204 						DEBUG(ai, 0, "[BuidPath] route building failed at tile 0x%X, aborting", route[part]);
   204 						DEBUG(ai, 0, "[BuidPath] route building failed at tile 0x%X, aborting", route[part]);
   205 						p->ainew.state = AI_STATE_NOTHING;
   205 						p->ainew.state = AI_STATE_NOTHING;
   206 						return 0;
   206 						return 0;
   207 					}
   207 					}
   208 
   208 
   209 					if (!CmdFailed(res)) cost += res;
   209 					if (CmdSucceeded(res)) cost += res;
   210 				}
   210 				}
   211 				// Go to the next tile
   211 				// Go to the next tile
   212 				part++;
   212 				part++;
   213 				// Check if it is still in range..
   213 				// Check if it is still in range..
   214 				if (part >= PathFinderInfo->route_length - 1) break;
   214 				if (part >= PathFinderInfo->route_length - 1) break;