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:
parent
a54b86af95
commit
2bd2dfd3a5
1 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue