Positioning out-of-sub particles relative to the level, easier to climb stairs

This commit is contained in:
Regalis
2015-11-22 17:11:13 +02:00
parent 1eaf22d3d0
commit 77024a31fb
17 changed files with 41 additions and 33 deletions
+2 -2
View File
@@ -353,12 +353,12 @@ namespace Barotrauma
GameMain.ParticleManager.CreateParticle("blood",
Position,
particleVel * Rand.Range(100.0f, 300.0f));
particleVel * Rand.Range(100.0f, 300.0f), 0.0f, character.AnimController.CurrentHull);
}
for (int i = 0; i < bloodAmount / 2; i++)
{
GameMain.ParticleManager.CreateParticle("waterblood", Position, Vector2.Zero);
GameMain.ParticleManager.CreateParticle("waterblood", Position, Vector2.Zero, 0.0f, character.AnimController.CurrentHull);
}
damage += Math.Max(amount,bleedingAmount) / character.MaxHealth * 100.0f;
+3 -8
View File
@@ -612,24 +612,19 @@ namespace Barotrauma
}
}
//the limb has gone through the surface of the water
if (Math.Abs(limb.LinearVelocity.Y) > 3.0 && inWater != prevInWater)
if (Math.Abs(limb.LinearVelocity.Y) > 5.0f && inWater != prevInWater)
{
//create a splash particle
GameMain.ParticleManager.CreateParticle("watersplash",
new Vector2(limb.Position.X, limbHull.Surface),
new Vector2(0.0f, Math.Abs(-limb.LinearVelocity.Y * 10.0f)),
0.0f);
//if (splash != null) splash.yLimits = ConvertUnits.ToSimUnits(
// new Vector2(
// limbHull.Rect.Y,
// limbHull.Rect.Y - limbHull.Rect.Height));
0.0f, limbHull);
GameMain.ParticleManager.CreateParticle("bubbles",
new Vector2(limb.Position.X, limbHull.Surface),
limb.LinearVelocity*0.001f,
0.0f);
0.0f, limbHull);