Reliablesender exception handling, buttons crashing multiplayer, using screwdrivers/wrenches with left click, RestoreCollision exception handling, nerfed c4, UpdateLimbCollisionCategories fix

This commit is contained in:
Regalis
2015-10-23 00:10:27 +03:00
parent 51e68f0949
commit b3462b24b4
34 changed files with 256 additions and 113 deletions

View File

@@ -185,10 +185,10 @@ namespace Barotrauma
public bool IsParentOf(GUIComponent component)
{
foreach (GUIComponent child in children)
for(int i = children.Count - 1; i >= 0; i--)
{
if (child == component) return true;
if (child.IsParentOf(component)) return true;
if (children[i] == component) return true;
if (children[i].IsParentOf(component)) return true;
}
return false;