- Larger icon for gap/ladder waypoints

- Creature-sub collision damage improvements (takes velocity of the limb into account)
- In-sub particles move with the sub
- Fixed artifacts spawning to non-pickable positions
- Fixed ItemInventories not being drawn if the item is in a subslot
- CauseOfDeath = Drowning if the character is in water while running out of oxy
- Some more deconstructable items
This commit is contained in:
Regalis
2016-01-20 23:31:37 +02:00
parent 75b8e44d3c
commit 97b3d8451c
19 changed files with 104 additions and 39 deletions
+16 -4
View File
@@ -74,7 +74,16 @@ namespace Barotrauma.Particles
spriteIndex = Rand.Int(prefab.Sprites.Count);
currentHull = Hull.FindHull(position, hullGuess);
if (currentHull != null && currentHull.Submarine != null) speed += ConvertUnits.ToDisplayUnits(currentHull.Submarine.Velocity);
//if (currentHull != null && currentHull.Submarine != null)
//{
// Vector2 subVel = ConvertUnits.ToDisplayUnits(currentHull.Submarine.Velocity);
// //subVel.Y = -subVel.Y;
// speed += subVel;
//}
//else
//{
// int a = 1;
//}
//if (currentHull == null) position = Submarine.Loaded == null ? position : position + Submarine.Loaded.Position;
this.position = position;
@@ -133,9 +142,12 @@ namespace Barotrauma.Particles
public bool Update(float deltaTime)
{
Vector2 subVel = currentHull ==null || currentHull.Submarine==null ? Vector2.Zero : ConvertUnits.ToDisplayUnits(currentHull.Submarine.Velocity);
//over 3 times faster than position += velocity * deltatime
position.X += velocity.X * deltaTime;
position.Y += velocity.Y * deltaTime;
position.X += (velocity.X+subVel.X) * deltaTime;
position.Y += (velocity.Y+subVel.Y) * deltaTime;
if (prefab.RotateToDirection)
{
@@ -237,7 +249,7 @@ namespace Barotrauma.Particles
{
position.Y = prevHullRect.Y - 1.0f;
velocity.X = Math.Abs(velocity.Y) * Math.Sign(velocity.X);
velocity.Y = -velocity.Y*0.1f;
velocity.Y = -velocity.Y * 0.1f;
}
if (position.X < prevHullRect.X)