mirror of
https://github.com/glest/glest-source.git
synced 2025-08-10 02:16:31 +02:00
fixed small bug
This commit is contained in:
@@ -665,13 +665,11 @@ namespace Game {
|
|||||||
if (!found) {
|
if (!found) {
|
||||||
for (int i = -1; i <= 1; ++i) {
|
for (int i = -1; i <= 1; ++i) {
|
||||||
for (int j = -1; j <= 1; ++j) {
|
for (int j = -1; j <= 1; ++j) {
|
||||||
if (!(i == 0 && j == 0)) {
|
Vec2i pos = position + Vec2i(i, j);
|
||||||
Vec2i pos = position + Vec2i(i, j);
|
found = (((targetField & fWater) == fWater) == map->getDeepSubmerged(map->getCell(pos))) && map->isFreeCell(pos, targetField, true);
|
||||||
found = (((targetField & fWater) == fWater) == map->getDeepSubmerged(map->getCell(pos))) && map->isFreeCell(pos, targetField, true);
|
if (found) {
|
||||||
if (found) {
|
position = pos;
|
||||||
position = pos;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found)
|
if (found)
|
||||||
|
Reference in New Issue
Block a user