Particle fixes, background sprites can emit particles if the camera is within the area where the particles are visible
This commit is contained in:
@@ -83,6 +83,9 @@ namespace Barotrauma.Particles
|
||||
AngularVelocityMax = AngularVelocityMin;
|
||||
}
|
||||
|
||||
AngularVelocityMin = MathHelper.ToRadians(AngularVelocityMin);
|
||||
AngularVelocityMax = MathHelper.ToRadians(AngularVelocityMax);
|
||||
|
||||
if (element.Attribute("startsize") == null)
|
||||
{
|
||||
StartSizeMin = ToolBox.GetAttributeVector2(element, "startsizemin", Vector2.One);
|
||||
@@ -177,5 +180,11 @@ namespace Barotrauma.Particles
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Vector2 CalculateEndPosition(Vector2 startPosition, Vector2 velocity)
|
||||
{
|
||||
//endPos = x + vt + 1/2 * at^2
|
||||
return startPosition + velocity * LifeTime + 0.5f * VelocityChange * LifeTime * LifeTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user