v0.13.0.11
This commit is contained in:
@@ -39,6 +39,12 @@ namespace Barotrauma.Items.Components
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
[Serialize(true, true, description: "Is the item currently able to push characters around? True by default. Only valid if blocksplayers is set to true.")]
|
||||
public bool CanPush
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//the angle in which the Character holds the item
|
||||
protected float holdAngle;
|
||||
@@ -208,6 +214,7 @@ namespace Barotrauma.Items.Components
|
||||
if (other.Body.UserData is Character character)
|
||||
{
|
||||
if (!IsActive) { return false; }
|
||||
if (!CanPush) { return false; }
|
||||
return character != picker;
|
||||
}
|
||||
else
|
||||
@@ -436,6 +443,7 @@ namespace Barotrauma.Items.Components
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//not attached -> pick the item instantly, ignoring picking time
|
||||
return OnPicked(picker);
|
||||
}
|
||||
@@ -443,6 +451,10 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
public override bool OnPicked(Character picker)
|
||||
{
|
||||
if (GameMain.NetworkMember != null && GameMain.NetworkMember.IsClient)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (base.OnPicked(picker))
|
||||
{
|
||||
DeattachFromWall();
|
||||
|
||||
Reference in New Issue
Block a user