forked from Mirrors/openclonk
parent
a34eea41dc
commit
db061b5cad
|
@ -850,10 +850,7 @@ public func RejectCollect(id item_id, object item)
|
|||
// Is the object a container? If so, try to empty it.
|
||||
if (item->~IsContainer() || item->~IsLiquidContainer())
|
||||
{
|
||||
var count = item->ContentsCount(), contents;
|
||||
while (--count >= 0)
|
||||
if (contents = item->Contents(count))
|
||||
contents->Enter(this);
|
||||
GrabContents(item);
|
||||
}
|
||||
// Can we collect the object itself?
|
||||
if (IsCollectionAllowed(item))
|
||||
|
|
|
@ -39,10 +39,7 @@ protected func RejectCollect(id item, object obj)
|
|||
// Is the object a container? If so, try to empty it.
|
||||
if (obj->~IsContainer() || obj->~IsLiquidContainer())
|
||||
{
|
||||
var count = obj->ContentsCount(), contents;
|
||||
while (--count >= 0)
|
||||
if (contents = obj->Contents(count))
|
||||
contents->Enter(this);
|
||||
GrabContents(obj);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue