Handle that the buildings is already repaired.

This commit is contained in:
johns 2002-03-08 16:26:51 +00:00
parent c43c20b1e0
commit 0efa0fe7c2

View file

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