Handle that the buildings is already repaired.
This commit is contained in:
parent
c43c20b1e0
commit
0efa0fe7c2
1 changed files with 3 additions and 2 deletions
|
@ -246,8 +246,9 @@ global void HandleActionRepair(Unit* unit)
|
|||
// FIXME: should I clear this here?
|
||||
unit->Orders[0].Goal=goal=NULL;
|
||||
NewResetPath(unit);
|
||||
} else if( !goal->HP ||
|
||||
goal->Orders[0].Action==UnitActionDie ) {
|
||||
} else if( !goal->HP
|
||||
|| goal->Orders[0].Action==UnitActionDie
|
||||
|| goal->HP > goal->Stats->HitPoints ) {
|
||||
unit->Orders[0].X=goal->X;
|
||||
unit->Orders[0].Y=goal->Y;
|
||||
RefsDebugCheck( !goal->Refs );
|
||||
|
|
Loading…
Add table
Reference in a new issue