Some new items that can be crafted out of Incendium, stairs can be used while wearing a diving suit

This commit is contained in:
Regalis11
2016-01-21 16:58:46 +02:00
parent 97b3d8451c
commit f0d7d2f26d
10 changed files with 73 additions and 6 deletions
@@ -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;
+9 -4
View File
@@ -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);
+10
View File
@@ -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)