v1.4.4.1 (Blood in the Water Update)

This commit is contained in:
Regalis11
2024-04-24 18:09:05 +03:00
parent 89b91d1c3e
commit ff1b8951a7
397 changed files with 15250 additions and 6479 deletions
@@ -30,6 +30,11 @@ namespace Barotrauma
Noise
}
[Serialize(0.0f, IsPropertySaveable.Yes), Editable]
public float BlinkFrequency { get; private set; }
private float blinkTimer = 0.0f;
[Serialize("0,0", IsPropertySaveable.Yes), Editable]
public Vector2 Offset { get; private set; }
@@ -242,7 +247,16 @@ namespace Barotrauma
}
}
if (!spriteState.IsActive) { continue; }
if (decorativeSprite.BlinkFrequency > 0.0f)
{
decorativeSprite.blinkTimer += deltaTime * decorativeSprite.BlinkFrequency;
decorativeSprite.blinkTimer %= 1.0f;
if (decorativeSprite.blinkTimer > 0.5f)
{
spriteState.IsActive = false;
continue;
}
}
//check if the sprite should be animated
bool animate = true;
foreach (PropertyConditional conditional in decorativeSprite.AnimationConditionals)
@@ -240,7 +240,7 @@ namespace Barotrauma
}
else
{
DebugConsole.ThrowError($"Sprite \"{file}\" not found!");
DebugConsole.ThrowError($"Sprite \"{file}\" not found!", contentPackage: contentPackage);
DebugConsole.Log(Environment.StackTrace.CleanupStackTrace());
}