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
@@ -89,7 +89,7 @@ namespace Barotrauma.Items.Components
if (!string.IsNullOrWhiteSpace(particles))
{
GameMain.ParticleManager.CreateParticle(particles, item.Position,
item.body.Rotation + ((item.body.Dir > 0.0f) ? 0.0f : MathHelper.Pi), 0.0f);
item.body.Rotation + ((item.body.Dir > 0.0f) ? 0.0f : MathHelper.Pi), 0.0f, item.CurrentHull);
}
return true;
@@ -75,7 +75,8 @@ namespace Barotrauma.Items.Components
for (int i = 0; i < 5; i++)
{
GameMain.ParticleManager.CreateParticle("bubbles", item.Position,
-currForce/5.0f + new Vector2(Rand.Range(-100.0f, 100.0f), Rand.Range(-50f, 50f)));
-currForce / 5.0f + new Vector2(Rand.Range(-100.0f, 100.0f), Rand.Range(-50f, 50f)),
0.0f, item.CurrentHull);
}
}
@@ -164,7 +164,7 @@ namespace Barotrauma.Items.Components
for (int i = 0; i < 10; i++)
{
var particle = GameMain.ParticleManager.CreateParticle("spark", item.Position,
baseVel + Rand.Vector(100.0f), 0.0f);
baseVel + Rand.Vector(100.0f), 0.0f, item.CurrentHull);
if (particle != null) particle.Size *= Rand.Range(0.5f, 1.0f);
}
@@ -68,7 +68,7 @@ namespace Barotrauma.Items.Components
for (int i = 0; i < 10; i++)
{
var particle = GameMain.ParticleManager.CreateParticle("spark", pt.item.Position,
baseVel + Rand.Vector(100.0f), 0.0f);
baseVel + Rand.Vector(100.0f), 0.0f, item.CurrentHull);
if (particle != null) particle.Size *= Rand.Range(0.5f, 1.0f);
}