Fixed cache select optimization

This commit is contained in:
jsalmon3 2004-08-29 18:57:06 +00:00
parent c77a0d4236
commit 7528ab19f0

View file

@ -131,7 +131,7 @@ int UnitCacheSelect(int x1, int y1, int x2, int y2, Unit** table)
UnitListItem* listitem;
// Optimize small searches.
if (x1 == x2 && y1 == y2) {
if (x1 >= x2 - 1 && y1 >= y2 - 1) {
return UnitCacheOnTile(x1, y1, table);
}