Unstable 1.1.14.0

This commit is contained in:
Markus Isberg
2023-10-02 16:43:54 +03:00
parent 94f5a93a0c
commit cf8f0de659
606 changed files with 21906 additions and 11456 deletions
@@ -85,7 +85,7 @@ namespace Barotrauma.Particles
public float StartDelay
{
get { return startDelay; }
set { startDelay = MathHelper.Clamp(value, Prefab.StartDelayMin, prefab.StartDelayMax); }
set { startDelay = Math.Max(value, 0.0f); }
}
public Vector2 Size
@@ -311,7 +311,8 @@ namespace Barotrauma.Particles
{
foreach (ParticleEmitter emitter in subEmitters)
{
emitter.Emit(deltaTime, position, currentHull);
emitter.Emit(deltaTime, position, currentHull, particleRotation: rotation,
sizeMultiplier: emitter.Prefab.Properties.CopyParentParticleScale ? Math.Max(size.X, size.Y) : 1.0f);
}
}
@@ -566,11 +567,12 @@ namespace Barotrauma.Particles
drawPosition = Timing.Interpolate(prevPosition, position);
drawRotation = Timing.Interpolate(prevRotation, rotation);
}
public void Draw(SpriteBatch spriteBatch)
{
Vector2 drawSize = size;
if (startDelay > 0.0f) { return; }
Vector2 drawSize = size;
if (prefab.GrowTime > 0.0f && totalLifeTime - lifeTime < prefab.GrowTime)
{
drawSize *= MathUtils.SmoothStep((totalLifeTime - lifeTime) / prefab.GrowTime);