diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index f2ca14af..f96b5568 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -154,7 +154,7 @@ void UnitUpdater::updateUnit(Unit *unit) { else if(unit->getCommandSize() > 0) { Command *command= unit->getCurrCommand(); if(command != NULL) { - const AttackCommandType *act= static_cast(command->getCommandType()); + const AttackCommandType *act= dynamic_cast(command->getCommandType()); if( act != NULL && act->getAttackSkillType() != NULL && act->getAttackSkillType()->getSpawnUnit() != "" && act->getAttackSkillType()->getSpawnUnitCount() > 0) {