(276e03242) Reset Use and Select inputs when releasing the Shoot input to prevent accidentally selecting/using items
This commit is contained in:
@@ -85,6 +85,25 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is KeyOrMouse keyOrMouse )
|
||||
{
|
||||
if (MouseButton.HasValue)
|
||||
{
|
||||
return keyOrMouse.MouseButton.HasValue && keyOrMouse.MouseButton.Value == MouseButton.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return keyOrMouse.Key.Equals(Key);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
switch (MouseButton)
|
||||
@@ -134,6 +153,16 @@ namespace Barotrauma
|
||||
get { return binding; }
|
||||
}
|
||||
|
||||
public void SetState()
|
||||
{
|
||||
hit = binding.IsHit();
|
||||
if (hit) hitQueue = true;
|
||||
|
||||
held = binding.IsDown();
|
||||
if (held) heldQueue = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
public void SetState()
|
||||
{
|
||||
hit = binding.IsHit();
|
||||
|
||||
Reference in New Issue
Block a user