Core/Unit: Fix a crash in GetCurrentMovementGeneratorType(). Author: dr.tenma

Fixes issue #1876

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-09-15 15:38:46 +02:00
parent e132da9547
commit 0856197d87
+2 -2
View File
@@ -498,14 +498,14 @@ void MotionMaster::Mutate(MovementGenerator *m, MovementSlot slot)
i_top = slot; i_top = slot;
} }
Impl[slot] = m;
if (i_top > slot) if (i_top > slot)
needInit[slot] = true; needInit[slot] = true;
else else
{ {
m->Initialize(*i_owner);
needInit[slot] = false; needInit[slot] = false;
m->Initialize(*i_owner);
} }
Impl[slot] = m;
} }
void MotionMaster::MovePath(uint32 path_id, bool repeatable) void MotionMaster::MovePath(uint32 path_id, bool repeatable)