From 8117d96c639866a38ff622ca1735a52cbae012e0 Mon Sep 17 00:00:00 2001 From: mathusummut Date: Thu, 27 Sep 2018 23:54:45 +0200 Subject: [PATCH] Fixed building-unit overlap bug --- source/glest_game/world/map.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/glest_game/world/map.cpp b/source/glest_game/world/map.cpp index aebb124e7..68e4bac6b 100644 --- a/source/glest_game/world/map.cpp +++ b/source/glest_game/world/map.cpp @@ -1417,7 +1417,8 @@ namespace Glest { } - if (getCell(currPos)->getUnit(field) == NULL || getCell(currPos)->getUnit(field) == unit || (unit->getType()->hasSkillClass(scBeBuilt) && !getCell(currPos)->getUnit(field)->getType()->hasSkillClass(scBeBuilt))) { + if (getCell(currPos)->getUnit(field) == NULL || getCell(currPos)->getUnit(field) == unit || + (unit->getType()->hasSkillClass(scBeBuilt) != getCell(currPos)->getUnit(field)->getType()->hasSkillClass(scBeBuilt))) { if (isMorph) { // unit is beeing morphed to another unit with maybe other field. getCell(currPos)->setUnit(field, unit);