Some new items that can be crafted out of Incendium, stairs can be used while wearing a diving suit
This commit is contained in:
@@ -630,7 +630,12 @@ namespace Barotrauma
|
||||
onGround = false;
|
||||
IgnorePlatforms = true;
|
||||
|
||||
movement = MathUtils.SmoothStep(movement, TargetMovement, 0.3f);
|
||||
Vector2 tempTargetMovement = TargetMovement;
|
||||
if (TargetMovement.Y != 0.0f)
|
||||
{
|
||||
tempTargetMovement.Y = Math.Max(Math.Abs(TargetMovement.Y), 0.6f) * Math.Sign(TargetMovement.Y);
|
||||
}
|
||||
movement = MathUtils.SmoothStep(movement, tempTargetMovement, 0.3f);
|
||||
|
||||
Vector2 footPos, handPos;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Barotrauma
|
||||
{
|
||||
This = 1, Parent = 2, Character = 4, Contained = 8, Nearby = 16, UseTarget=32
|
||||
}
|
||||
|
||||
|
||||
private TargetType targetTypes;
|
||||
private string[] targetNames;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Barotrauma
|
||||
|
||||
private Explosion explosion;
|
||||
|
||||
public readonly bool Fire;
|
||||
public readonly float FireSize;
|
||||
|
||||
private Sound sound;
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace Barotrauma
|
||||
explosion = new Explosion(subElement);
|
||||
break;
|
||||
case "fire":
|
||||
Fire = true;
|
||||
FireSize = ToolBox.GetAttributeFloat(subElement,"size",10.0f);
|
||||
break;
|
||||
case "requireditem":
|
||||
case "requireditems":
|
||||
@@ -215,7 +215,12 @@ namespace Barotrauma
|
||||
if (explosion != null) explosion.Explode(entity.WorldPosition);
|
||||
|
||||
|
||||
if (Fire) new FireSource(entity.WorldPosition);
|
||||
if (FireSize > 0.0f)
|
||||
{
|
||||
var fire = new FireSource(entity.WorldPosition);
|
||||
|
||||
fire.Size = new Vector2(FireSize, fire.Size.Y);
|
||||
}
|
||||
|
||||
if (sound != null) sound.Play(1.0f, 1000.0f, entity.WorldPosition);
|
||||
|
||||
|
||||
@@ -44,6 +44,16 @@ namespace Barotrauma
|
||||
public Vector2 Size
|
||||
{
|
||||
get { return size; }
|
||||
set
|
||||
{
|
||||
if (value == size) return;
|
||||
|
||||
Vector2 sizeChange = value - size;
|
||||
|
||||
size = value;
|
||||
position.X -= sizeChange.X * 0.5f;
|
||||
LimitSize();
|
||||
}
|
||||
}
|
||||
|
||||
public FireSource(Vector2 worldPosition, Hull spawningHull = null, bool networkEvent=false)
|
||||
|
||||
Reference in New Issue
Block a user