(c4338b107) Disable aiming when interacting with an item other than ladders.

This commit is contained in:
Joonas Rikkonen
2019-04-04 11:06:44 +03:00
parent 0cd81c6a99
commit 3f05035c18
6 changed files with 19 additions and 15 deletions
@@ -1406,17 +1406,7 @@ namespace Barotrauma
}
}
#if CLIENT
//if the cursor is on a UI component, disable interaction with the left mouse button
//to prevent accidentally selecting items when clicking UI elements
if (picker == Character.Controlled && GUI.MouseOn != null)
{
if (GameMain.Config.KeyBind(ic.PickKey).MouseButton == 0) pickHit = false;
if (GameMain.Config.KeyBind(ic.SelectKey).MouseButton == 0) selectHit = false;
}
#endif
}
}
if (!pickHit && !selectHit) continue;
if (!ic.HasRequiredSkills(picker, out Skill tempRequiredSkill)) hasRequiredSkills = false;