Progress + prettier ice walls
This commit is contained in:
@@ -89,8 +89,8 @@ namespace Barotrauma
|
||||
|
||||
public override bool Contains(Vector2 position)
|
||||
{
|
||||
return (Submarine.RectContains(rect, position) &&
|
||||
!Submarine.RectContains(new Rectangle(rect.X + 4, rect.Y - 4, rect.Width - 8, rect.Height - 8), position));
|
||||
return (Submarine.RectContains(WorldRect, position) &&
|
||||
!Submarine.RectContains(MathUtils.ExpandRect(WorldRect, -5), position));
|
||||
}
|
||||
|
||||
private void FindHulls()
|
||||
@@ -142,7 +142,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (GameMain.DebugDraw)
|
||||
{
|
||||
Vector2 center = new Vector2(rect.X + rect.Width / 2.0f, -(rect.Y - rect.Width / 2.0f));
|
||||
Vector2 center = new Vector2(WorldRect.X + rect.Width / 2.0f, -(WorldRect.Y - rect.Width / 2.0f));
|
||||
GUI.DrawLine(sb, center, center + flowForce/10.0f, Color.Red);
|
||||
|
||||
GUI.DrawLine(sb, center + Vector2.One * 5.0f, center + lerpedFlowForce / 10.0f + Vector2.One * 5.0f, Color.Orange);
|
||||
@@ -152,7 +152,7 @@ namespace Barotrauma
|
||||
|
||||
Color clr = (open == 0.0f) ? Color.Red : Color.Cyan;
|
||||
|
||||
GUI.DrawRectangle(sb, new Rectangle(rect.X, -rect.Y, rect.Width, rect.Height), clr*0.5f, true);
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.X, -WorldRect.Y, rect.Width, rect.Height), clr * 0.5f, true);
|
||||
|
||||
if (isHorizontal)
|
||||
{
|
||||
@@ -160,11 +160,11 @@ namespace Barotrauma
|
||||
{
|
||||
if (linkedTo[i].Rect.Center.X > rect.Center.X)
|
||||
{
|
||||
GUI.DrawRectangle(sb, new Rectangle(rect.Right, -rect.Y, 10, rect.Height), Color.Green * 0.3f, true);
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.Right, -WorldRect.Y, 10, rect.Height), Color.Green * 0.3f, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.DrawRectangle(sb, new Rectangle(rect.X - 10, -rect.Y, 10, rect.Height), Color.Green * 0.3f, true);
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.X - 10, -WorldRect.Y, 10, rect.Height), Color.Green * 0.3f, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,13 +172,13 @@ namespace Barotrauma
|
||||
{
|
||||
for (int i = 0; i < linkedTo.Count; i++)
|
||||
{
|
||||
if (linkedTo[i].Rect.Y - linkedTo[i].Rect.Height/2.0f > rect.Y)
|
||||
if (linkedTo[i].Rect.Y - linkedTo[i].Rect.Height / 2.0f > WorldRect.Y)
|
||||
{
|
||||
GUI.DrawRectangle(sb, new Rectangle(rect.X, -rect.Y - 10, rect.Width, 10), Color.Green * 0.3f, true);
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.X, -WorldRect.Y - 10, rect.Width, 10), Color.Green * 0.3f, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.DrawRectangle(sb, new Rectangle(rect.X, -rect.Y + rect.Height, rect.Width, 10), Color.Green * 0.3f, true);
|
||||
GUI.DrawRectangle(sb, new Rectangle(WorldRect.X, -WorldRect.Y + rect.Height, rect.Width, 10), Color.Green * 0.3f, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,7 +186,7 @@ namespace Barotrauma
|
||||
if (isSelected)
|
||||
{
|
||||
GUI.DrawRectangle(sb,
|
||||
new Vector2(rect.X - 5, -rect.Y - 5),
|
||||
new Vector2(WorldRect.X - 5, -WorldRect.Y - 5),
|
||||
new Vector2(rect.Width + 10, rect.Height + 10),
|
||||
Color.Red);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ namespace Barotrauma
|
||||
int index = (int)Math.Floor(flowForce.Length() / 100.0f);
|
||||
index = Math.Min(index,2);
|
||||
|
||||
soundIndex = SoundPlayer.flowSounds[index].Loop(soundIndex, soundVolume, Position, 2000.0f);
|
||||
soundIndex = SoundPlayer.flowSounds[index].Loop(soundIndex, soundVolume, WorldPosition, 2000.0f);
|
||||
|
||||
flowForce = Vector2.Zero;
|
||||
lerpedFlowForce = Vector2.Lerp(lerpedFlowForce, flowForce, 0.05f);
|
||||
|
||||
Reference in New Issue
Block a user