- commented out another possibly bad assert /exception

This commit is contained in:
Mark Vejvoda
2010-11-27 08:23:45 +00:00
parent 4e36b4c30c
commit ee249b8878

View File

@@ -820,10 +820,12 @@ void Map::putUnitCells(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()) == NULL); // NOT SURE UNDER WHAT CONDITIONS THIS COULD HAPPEN?
if(getCell(currPos)->getUnit(unit->getCurrField()) != NULL) {
throw runtime_error("getCell(currPos)->getUnit(unit->getCurrField()) != NULL"); //assert(getCell(currPos)->getUnit(unit->getCurrField()) == NULL);
} //if(getCell(currPos)->getUnit(unit->getCurrField()) != NULL) {
// throw runtime_error("getCell(currPos)->getUnit(unit->getCurrField()) != NULL");
//}
getCell(currPos)->setUnit(unit->getCurrField(), unit); getCell(currPos)->setUnit(unit->getCurrField(), unit);