mirror of
https://github.com/glest/glest-source.git
synced 2025-08-31 03:39:54 +02:00
Fixed building-unit overlap bug
This commit is contained in:
@@ -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) {
|
if (isMorph) {
|
||||||
// unit is beeing morphed to another unit with maybe other field.
|
// unit is beeing morphed to another unit with maybe other field.
|
||||||
getCell(currPos)->setUnit(field, unit);
|
getCell(currPos)->setUnit(field, unit);
|
||||||
|
Reference in New Issue
Block a user