Hopefully fixed clients forcing other players to pick items when the clients actually selected them (e29655c) without breaking AI interactions with items

This commit is contained in:
Joonas Rikkonen
2018-03-02 18:04:01 +02:00
parent 199794cf41
commit c624ff2c8c
@@ -1086,21 +1086,8 @@ namespace Barotrauma
} }
else else
{ {
if (forceSelectKey && ic.CanBeSelected) pickHit = (forceActionKey && ic.CanBePicked) || picker.IsKeyHit(ic.PickKey);
{ selectHit = (forceSelectKey && ic.CanBeSelected) || picker.IsKeyHit(ic.SelectKey);
if (ic.PickKey == InputType.Select) pickHit = true;
if (ic.SelectKey == InputType.Select) selectHit = true;
}
else if (forceActionKey)
{
if (ic.PickKey == InputType.Use) pickHit = true;
if (ic.SelectKey == InputType.Use) selectHit = true;
}
else
{
pickHit = picker.IsKeyHit(ic.PickKey);
selectHit = picker.IsKeyHit(ic.SelectKey);
}
} }
if (!pickHit && !selectHit) continue; if (!pickHit && !selectHit) continue;