From 8602d96dcad9c22015ae3bb8e5268b5af054991a Mon Sep 17 00:00:00 2001 From: johns <> Date: Thu, 27 Apr 2000 18:22:50 +0000 Subject: [PATCH] Attacking wall fixed, but now didn't stop always. --- src/action/action_attack.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/action/action_attack.cpp b/src/action/action_attack.cpp index 1dcfe2f45..946242d05 100644 --- a/src/action/action_attack.cpp +++ b/src/action/action_attack.cpp @@ -107,7 +107,9 @@ local void MoveToTarget(Unit* unit) int wall; int err; - if( unit->Command.Action==UnitActionAttackGround ) { + if( unit->Command.Action==UnitActionAttackGround + || WallOnMap(unit->Command.Data.Move.DX,unit->Command.Data.Move.DY) ) { + // FIXME: I think also needed for attacking wall // FIXME: workaround for pathfinder problem unit->Command.Data.Move.DX-=unit->Command.Data.Move.Range; unit->Command.Data.Move.DY-=unit->Command.Data.Move.Range;