From 12fdf262da3f08fc74bce6c7581374c1ab0efb1a Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Tue, 27 Mar 2012 19:53:43 +0000 Subject: [PATCH] - bugfix for passing commandtype --- source/glest_game/world/unit_updater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 7c3de32a..3d94eee9 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -1805,8 +1805,10 @@ void UnitUpdater::updateProduce(Unit *unit, int frameIndex) { delete produced; } else{ + command= unit->getCurrCommand(); + produced->create(); - produced->born(command->getCommandType()); + produced->born((command != NULL ? command->getCommandType() : NULL)); world->getStats()->produce(unit->getFactionIndex()); const CommandType *ct= produced->computeCommandType(unit->getMeetingPos()); if(ct!=NULL){