correct bug when container with container with unit is destroyed

This commit is contained in:
jarod42 2004-06-26 15:48:54 +00:00
parent bdd9f47bf7
commit 83152f3da0

View file

@ -2664,6 +2664,9 @@ void DestroyAllInside(Unit* source)
// No Corpses, we are inside something, and we can't be seen
unit = source->UnitInside;
for (i = source->InsideCount; i; --i, unit = unit->NextContained) {
if (unit->UnitInside) {
DestroyAllInside(unit);
}
RemoveUnit(unit, NULL);
UnitLost(unit);
UnitClearOrders(unit);