diff options
author | matthijs <matthijs@openttd.org> | 2005-05-23 19:00:16 +0000 |
---|---|---|
committer | matthijs <matthijs@openttd.org> | 2005-05-23 19:00:16 +0000 |
commit | a2f691b24ae9de208fa997ac5766c59cc26dd7fa (patch) | |
tree | b3cb09e2076d5931bdacfa8040e1bdb1314d8e01 /npf.c | |
parent | 5e040110fc7ef481caa536e8fe183bda2b5f4314 (diff) | |
download | openttd-a2f691b24ae9de208fa997ac5766c59cc26dd7fa.tar.xz |
(svn r2363) - Codechange: [NPF] Removed caching the endnode check. The code for this was buggy, fundamentally flawed and barely useful. (Hackykid)
Diffstat (limited to 'npf.c')
-rw-r--r-- | npf.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -443,22 +443,14 @@ int32 NPFFindStationOrTile(AyStar* as, OpenListNode *current) { AyStarNode *node = ¤t->path.node; TileIndex tile = node->tile; - /* See if we checked this before */ - if (NPFGetFlag(node, NPF_FLAG_TARGET_CHECKED)) - return NPFGetFlag(node, NPF_FLAG_IS_TARGET); - /* We're gonna check this now and store the result, let's mark that */ - NPFSetFlag(node, NPF_FLAG_TARGET_CHECKED, true); - /* If GetNeighbours said we could get here, we assume the station type * is correct */ if ( (fstd->station_index == -1 && tile == fstd->dest_coords) || /* We've found the tile, or */ (IsTileType(tile, MP_STATION) && _map2[tile] == fstd->station_index) /* the station */ ) { - NPFSetFlag(node, NPF_FLAG_TARGET_CHECKED, true); return AYSTAR_FOUND_END_NODE; } else { - NPFSetFlag(node, NPF_FLAG_TARGET_CHECKED, false); return AYSTAR_DONE; } } |