From 4e36b4c30c205f0ad21fd28e7a5d977fc9c4489d Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 27 Nov 2010 07:11:54 +0000 Subject: [PATCH] - commented out what seems to be a bad assert / exception check --- source/glest_game/world/map.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/glest_game/world/map.cpp b/source/glest_game/world/map.cpp index d5b9a1d92..9aee461a9 100644 --- a/source/glest_game/world/map.cpp +++ b/source/glest_game/world/map.cpp @@ -859,10 +859,13 @@ void Map::clearUnitCells(Unit *unit, const Vec2i &pos) { } if(ut->hasCellMap() == false || ut->getCellMapCell(i, j, unit->getModelFacing())) { - assert(getCell(currPos)->getUnit(unit->getCurrField())==unit); - if(getCell(currPos)->getUnit(unit->getCurrField()) != unit) { - throw runtime_error("getCell(currPos)->getUnit(unit->getCurrField()) != unit"); - } + // This seems to be a bad assert since you can clear the cell + // for many reasons including a unit dieing. + + //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);