v1.4.4.1 (Blood in the Water Update)
This commit is contained in:
@@ -20,6 +20,8 @@ namespace Barotrauma
|
||||
{
|
||||
if (damage <= 0.0f) { return; }
|
||||
Vector2 particlePos = worldPosition;
|
||||
Vector2 particleDir = particlePos - WorldPosition;
|
||||
if (particleDir.LengthSquared() > 0.0001f) { particleDir = Vector2.Normalize(particleDir); }
|
||||
if (!Cells.Any(c => c.IsPointInside(particlePos)))
|
||||
{
|
||||
bool intersectionFound = false;
|
||||
@@ -31,6 +33,7 @@ namespace Barotrauma
|
||||
{
|
||||
intersectionFound = true;
|
||||
particlePos = intersection;
|
||||
particleDir = edge.GetNormal(cell);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -38,14 +41,15 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 particleDir = particlePos - WorldPosition;
|
||||
if (particleDir.LengthSquared() > 0.0001f) { particleDir = Vector2.Normalize(particleDir); }
|
||||
int particleAmount = MathHelper.Clamp((int)damage, 1, 10);
|
||||
for (int i = 0; i < particleAmount; i++)
|
||||
{
|
||||
var particle = GameMain.ParticleManager.CreateParticle("iceshards",
|
||||
var particle = GameMain.ParticleManager.CreateParticle("iceexplosionsmall",
|
||||
particlePos + Rand.Vector(5.0f),
|
||||
particleDir * Rand.Range(200.0f, 500.0f) + Rand.Vector(100.0f));
|
||||
particleDir * Rand.Range(30.0f, 500.0f) + Rand.Vector(20.0f));
|
||||
GameMain.ParticleManager.CreateParticle("iceshards",
|
||||
particlePos + Rand.Vector(5.0f),
|
||||
particleDir * Rand.Range(100.0f, 500.0f) + Rand.Vector(100.0f));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var rects in blockedRects.Values)
|
||||
{
|
||||
foreach (var rect in rects)
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ namespace Barotrauma
|
||||
|
||||
//Maximum number of visible objects drawn at once. Should be large enough to not have an effect during normal gameplay,
|
||||
//but small enough to prevent wrecking performance when zooming out very far
|
||||
const int MaxVisibleObjects = 500;
|
||||
const int MaxVisibleObjects = 600;
|
||||
|
||||
private Rectangle currentGridIndices;
|
||||
|
||||
|
||||
@@ -362,6 +362,13 @@ namespace Barotrauma
|
||||
GUI.DrawLine(spriteBatch, new Vector2(edge.Point1.X + cell.Translation.X, -(edge.Point1.Y + cell.Translation.Y)),
|
||||
new Vector2(edge.Point2.X + cell.Translation.X, -(edge.Point2.Y + cell.Translation.Y)), edge.NextToCave ? Color.Red : (cell.Body == null ? Color.Cyan * 0.5f : (edge.IsSolid ? Color.White : Color.Gray)),
|
||||
width: edge.NextToCave ? 8 : 1);
|
||||
|
||||
Vector2 normal = edge.GetNormal(cell);
|
||||
GUI.DrawLine(spriteBatch,
|
||||
(edge.Center + cell.Translation).FlipY(),
|
||||
(edge.Center + cell.Translation + normal * 32).FlipY(),
|
||||
Color.Red * 0.5f,
|
||||
width: 3);
|
||||
}
|
||||
|
||||
foreach (Vector2 point in cell.BodyVertices)
|
||||
|
||||
Reference in New Issue
Block a user