mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 07:31:21 +02:00
- commented out what seems to be a bad assert / exception check
This commit is contained in:
@@ -859,10 +859,13 @@ void Map::clearUnitCells(Unit *unit, const Vec2i &pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(ut->hasCellMap() == false || ut->getCellMapCell(i, j, unit->getModelFacing())) {
|
if(ut->hasCellMap() == false || ut->getCellMapCell(i, j, unit->getModelFacing())) {
|
||||||
assert(getCell(currPos)->getUnit(unit->getCurrField())==unit);
|
// This seems to be a bad assert since you can clear the cell
|
||||||
if(getCell(currPos)->getUnit(unit->getCurrField()) != unit) {
|
// for many reasons including a unit dieing.
|
||||||
throw runtime_error("getCell(currPos)->getUnit(unit->getCurrField()) != unit");
|
|
||||||
}
|
//assert(getCell(currPos)->getUnit(unit->getCurrField())==unit);
|
||||||
|
//if(getCell(currPos)->getUnit(unit->getCurrField()) != unit) {
|
||||||
|
// throw runtime_error("getCell(currPos)->getUnit(unit->getCurrField()) != unit");
|
||||||
|
//}
|
||||||
|
|
||||||
getCell(currPos)->setUnit(unit->getCurrField(), NULL);
|
getCell(currPos)->setUnit(unit->getCurrField(), NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user