Merge branch 'master' of https://github.com/Faerdan/Barotrauma into Faerdan-master
Conflicts: Barotrauma/BarotraumaClient/Source/Map/MapEntity.cs Barotrauma/BarotraumaClient/Source/Screens/GameScreen.cs Barotrauma/BarotraumaShared/Source/Characters/Character.cs Barotrauma/BarotraumaShared/Source/Items/Item.cs
This commit is contained in:
@@ -101,9 +101,7 @@ namespace Barotrauma.Items.Components
|
||||
pickTimer = 0.0f;
|
||||
while (pickTimer < requiredTime && Screen.Selected != GameMain.EditMapScreen)
|
||||
{
|
||||
if (picker.IsKeyDown(InputType.Aim) ||
|
||||
!item.IsInPickRange(picker.WorldPosition) ||
|
||||
picker.Stun > 0.0f || picker.IsDead)
|
||||
if (picker.IsKeyDown(InputType.Aim) || !picker.CanInteractWith(item))
|
||||
{
|
||||
StopPicking(picker);
|
||||
yield return CoroutineStatus.Success;
|
||||
|
||||
@@ -76,10 +76,8 @@ namespace Barotrauma.Items.Components
|
||||
this.cam = cam;
|
||||
|
||||
if (character == null
|
||||
|| character.IsDead
|
||||
|| character.Stun > 0.0f
|
||||
|| character.SelectedConstruction != item
|
||||
|| Vector2.Distance(character.Position, item.Position) > item.PickDistance * 2.0f)
|
||||
|| !character.CanInteractWith(item))
|
||||
{
|
||||
if (character != null)
|
||||
{
|
||||
@@ -149,7 +147,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override bool Use(float deltaTime, Character activator = null)
|
||||
{
|
||||
if (character == null || activator != character || character.SelectedConstruction != item)
|
||||
if (character == null || activator != character || character.SelectedConstruction != item || !character.CanInteractWith(item))
|
||||
{
|
||||
character = null;
|
||||
return false;
|
||||
@@ -164,7 +162,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override void SecondaryUse(float deltaTime, Character character = null)
|
||||
{
|
||||
if (this.character == null || this.character != character || this.character.SelectedConstruction != item)
|
||||
if (this.character == null || this.character != character || this.character.SelectedConstruction != item || !character.CanInteractWith(item))
|
||||
{
|
||||
character = null;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user