From 9cc5a7566a8071d4b735254ab23cf9cda5e67159 Mon Sep 17 00:00:00 2001 From: titiger Date: Wed, 1 Feb 2017 23:58:00 +0100 Subject: [PATCH] revert some changes which were meant for debugging only --- source/glest_game/world/unit_updater.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 6c0a08e6..ed700383 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -382,14 +382,7 @@ void UnitUpdater::spawnAttack(Unit *unit,string spawnUnit,int spawnUnitcount,int // world->getStats()->produce(unit->getFactionIndex(),spawned->getType()->getCountUnitProductionInStats()); const CommandType *ct= spawned->getType()->getFirstAttackCommand(unit->getTargetField()); if(ct == NULL){ - - Cell* cell=map->getCell(targetPos); - - Field targetField=unit->getTargetField(); - - Unit* cellUnit=cell->getUnit(targetField); - - ct= spawned->computeCommandType(targetPos,cellUnit); + ct= spawned->computeCommandType(targetPos,map->getCell(targetPos)->getUnit(unit->getTargetField())); } if(ct != NULL){ if(SystemFlags::getSystemSettingType(SystemFlags::debugUnitCommands).enabled) SystemFlags::OutputDebug(SystemFlags::debugUnitCommands,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);