- bugfix for passing commandtype

This commit is contained in:
Mark Vejvoda 2012-03-27 19:53:43 +00:00
parent 8a2b90895d
commit 12fdf262da
1 changed files with 3 additions and 1 deletions

View File

@ -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){