From ba957ed9f476a39f5bbea621814bbe191493428c Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 23 Mar 2009 15:26:13 -0600 Subject: *Allow knockback creatures. --HG-- branch : trunk --- src/game/PointMovementGenerator.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/game/PointMovementGenerator.cpp') diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index adaaf9afbfc..084dad7cfa8 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -28,9 +28,10 @@ template void PointMovementGenerator::Initialize(T &unit) { - unit.StopMoving(); + //unit.StopMoving(); + unit.clearUnitState(UNIT_STAT_MOVING); Traveller traveller(unit); - i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z); + i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z, !unit.hasUnitState(UNIT_STAT_JUMPING)); if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly()) unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2); @@ -67,7 +68,7 @@ template void PointMovementGenerator:: Finalize(T &unit) { if(unit.hasUnitState(UNIT_STAT_CHARGING)) - unit.clearUnitState(UNIT_STAT_CHARGING); + unit.clearUnitState(UNIT_STAT_CHARGING | UNIT_STAT_JUMPING); else if(arrived) MovementInform(unit); } -- cgit v1.2.3