Items outside the sub cannot be deattached. Closes #562

This commit is contained in:
Joonas Rikkonen
2018-08-20 20:42:57 +03:00
parent 898e8dfdb1
commit 012245fbaa
3 changed files with 14 additions and 0 deletions
@@ -224,6 +224,9 @@ namespace Barotrauma
if (GameMain.Server != null)
{
var holdable = item.GetComponent<Holdable>();
if (holdable != null && !holdable.CanBeDeattached()) continue;
if (!item.CanClientAccess(c)) continue;
}
TryPutItem(item, i, true, true, c.Character, false);