Attacking wall fixed, but now didn't stop always.

This commit is contained in:
johns 2000-04-27 18:22:50 +00:00
parent 11427618ed
commit 8602d96dca

View file

@ -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;