Fixed building-unit overlap bug

This commit is contained in:
mathusummut
2018-09-27 23:54:45 +02:00
parent e5cc8044d0
commit 8117d96c63

View File

@@ -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);