Unstable 0.1500.4.0 (Shrek edition)

This commit is contained in:
Markus Isberg
2021-09-23 21:29:31 +09:00
parent 5a6bbcc79e
commit 3043a9a7bc
124 changed files with 3571 additions and 1848 deletions
@@ -41,21 +41,13 @@ namespace Barotrauma
public Sprite(Texture2D texture, Rectangle? sourceRectangle, Vector2? newOffset, float newRotation = 0.0f, string path = null)
{
this.texture = texture;
sourceRect = sourceRectangle ?? new Rectangle(0, 0, texture.Width, texture.Height);
offset = newOffset ?? Vector2.Zero;
size = new Vector2(sourceRect.Width, sourceRect.Height);
origin = Vector2.Zero;
effects = SpriteEffects.None;
rotation = newRotation;
FilePath = path;
AddToList(this);
}
@@ -85,7 +77,7 @@ namespace Barotrauma
EnsureLazyLoaded(isAsync: true);
}
public void EnsureLazyLoaded(bool isAsync=false)
public void EnsureLazyLoaded(bool isAsync = false)
{
if (!LazyLoad || texture != null || cannotBeLoaded || loadingAsync) { return; }
loadingAsync = isAsync;
@@ -382,7 +374,7 @@ namespace Barotrauma
{
foreach (Sprite s in LoadedSprites)
{
if (s.FullPath == FullPath) return;
if (s.FullPath == FullPath) { return; }
}
}
}