- another segfault bugfix for spawned attacks

This commit is contained in:
Mark Vejvoda 2011-02-12 21:47:31 +00:00
parent 7dcb12ff60
commit 91a56e7805
1 changed files with 1 additions and 1 deletions

View File

@ -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<const AttackCommandType*>(command->getCommandType());
const AttackCommandType *act= dynamic_cast<const AttackCommandType*>(command->getCommandType());
if( act != NULL && act->getAttackSkillType() != NULL &&
act->getAttackSkillType()->getSpawnUnit() != "" && act->getAttackSkillType()->getSpawnUnitCount() > 0) {