Positioning out-of-sub particles relative to the level, easier to climb stairs
This commit is contained in:
@@ -43,25 +43,26 @@ namespace Barotrauma
|
||||
public void Explode(Vector2 simPosition)
|
||||
{
|
||||
Vector2 displayPosition = ConvertUnits.ToDisplayUnits(simPosition);
|
||||
|
||||
Hull hull = Hull.FindHull(displayPosition);
|
||||
|
||||
if (shockwave)
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("shockwave", displayPosition,
|
||||
Vector2.Zero, 0.0f);
|
||||
Vector2.Zero, 0.0f, hull);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < attack.Range * 10; i++)
|
||||
{
|
||||
if (sparks)
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("spark", displayPosition,
|
||||
Rand.Vector(Rand.Range(500.0f, 800.0f)), 0.0f);
|
||||
Rand.Vector(Rand.Range(500.0f, 800.0f)), 0.0f, hull);
|
||||
}
|
||||
if (flames)
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("explosionfire", displayPosition + Rand.Vector(50f),
|
||||
Rand.Vector(Rand.Range(50f, 100.0f)), 0.0f);
|
||||
Rand.Vector(Rand.Range(50f, 100.0f)), 0.0f, hull);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +81,6 @@ namespace Barotrauma
|
||||
|
||||
if (force == 0.0f && attack.Stun == 0.0f && attack.GetDamage(1.0f) == 0.0f) return;
|
||||
|
||||
//Hull hull = Hull.FindHull(displayPosition);
|
||||
|
||||
foreach (Character c in Character.CharacterList)
|
||||
{
|
||||
float dist = Vector2.Distance(c.SimPosition, simPosition);
|
||||
|
||||
@@ -254,7 +254,7 @@ namespace Barotrauma
|
||||
UpdateRoomToRoom(deltaTime);
|
||||
}
|
||||
|
||||
if (FlowForce.Length() > 150.0f && flowTargetHull != null && flowTargetHull.Volume < flowTargetHull.FullVolume)
|
||||
if (LerpedFlowForce.Length() > 150.0f && flowTargetHull != null && flowTargetHull.Volume < flowTargetHull.FullVolume)
|
||||
{
|
||||
//UpdateFlowForce();
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ namespace Barotrauma
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("mist",
|
||||
new Vector2(rect.X + WaveWidth * i,surface + waveY[i]),
|
||||
new Vector2(0.0f, -50.0f));
|
||||
new Vector2(0.0f, -50.0f), 0.0f, this);
|
||||
}
|
||||
|
||||
waveY[i] = waveY[i] + waveVel[i];
|
||||
|
||||
Reference in New Issue
Block a user