Fixed a bug in attack code which caused fighting unit's Moving flag to be

still set (the "move to target" subaction never cleared it).  It is only for
the hierarchic pathfinder, anyway.
This commit is contained in:
latimerius 2002-05-27 20:43:50 +00:00
parent a54b86af95
commit 2bd2dfd3a5

View file

@ -299,6 +299,14 @@ local void MoveToTarget(Unit* unit)
// NEW return codes supported, FIXME: but johns thinks not perfect.
#ifdef HIERARCHIC_PATHFINDER
if( unit->Reset ) {
if( CheckForTargetInRange(unit) ) {
return;
}
}
if (err==PF_REACHED) {
#else /* HIERARCHIC_PATHDFINDER */
if( unit->Reset ) {
//
// Look if we have reached the target.
@ -306,6 +314,7 @@ local void MoveToTarget(Unit* unit)
if( CheckForTargetInRange(unit) ) {
return;
}
#endif /* HIERARCHIC_PATHDFINDER */
goal=unit->Orders[0].Goal;
//