From 87c3a11876d140c52a8e255b11484161b6626914 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 12 Oct 2012 21:50:00 +0000 Subject: [PATCH] - bugfix for lua setUnitPosition method --- source/glest_game/world/world.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index 813809e4..3c8ca199 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -1302,7 +1302,9 @@ void World::setUnitPosition(int unitId, Vec2i pos) { if(unit == NULL) { throw megaglest_runtime_error("Can not find unit to set position unitId = " + intToStr(unitId)); } - unit->setPos(pos,true); + unit->setTargetPos(pos); + //unit->setPos(pos,true); + this->moveUnitCells(unit); } void World::addCellMarker(Vec2i pos, int factionIndex, const string ¬e, const string textureFile) {