Fixed another bug in rescueing units.

This commit is contained in:
johns 2002-03-10 04:40:20 +00:00
parent 8fe028726e
commit dd84b2285b

View file

@ -708,6 +708,7 @@ global void UnitLost(Unit* unit)
unit->SavedOrder.Goal=NoUnitP;
}
unit->Orders[0].Action=UnitActionStill;
unit->SubAction=unit->State=0;
DebugCheck( player->NumFoodUnits > UnitMax);
DebugCheck( player->NumBuildings > UnitMax);
@ -1398,15 +1399,6 @@ global void ChangeUnitOwner(Unit* unit,Player* oldplayer,Player* newplayer)
//
UnitLost(unit);
#if 0
// Remove from old player table
temp=oldplayer->Units[--oldplayer->TotalNumUnits];
temp->PlayerSlot=unit->PlayerSlot;
*unit->PlayerSlot=temp;
oldplayer->Units[oldplayer->TotalNumUnits]=NULL;
#endif
//
// Now the new side!
//