May 24, 2012 12:53
A couple months ago I changed the Path system to change unreachable terrain cells into cliffs. This greatly improved path-finding performance on fully-enclosed maps when the strategic AI tried to explore outside the playable area. Unfortunately, some Instant Action maps start units outside the playable area as a time delay, and path-finding crashed on those maps.
To fix the problem, I added a check in path-finding to prevent the crash and then changed how unreachable cells work. Instead of changing unreachable cells into cliffs, I modified path-finding to treat unreachable cells as impassable regardless of cell type. Units use the unmodified cell types so they don't trigger "stuck" behavior when crossing unreachable terrain. Units outside the playable area now follow designer-placed paths exactly since path-finding fails but they do seem to arrive at their destinations.
battlezone