v1.5.7.0 (Summer Update)

This commit is contained in:
Regalis11
2024-06-18 16:49:51 +03:00
parent 4a63dacbce
commit 230d1b6e78
263 changed files with 7792 additions and 2845 deletions
@@ -107,7 +107,7 @@ namespace Barotrauma
static partial void AddToList(Sprite sprite);
public Sprite(ContentXElement element, string path = "", string file = "", bool lazyLoad = false)
public Sprite(ContentXElement element, string path = "", string file = "", bool lazyLoad = false, float sourceRectScale = 1)
{
if (element is null)
{
@@ -137,7 +137,7 @@ namespace Barotrauma
LoadTexture(ref sourceVector, ref shouldReturn);
}
if (shouldReturn) { return; }
sourceRect = new Rectangle((int)sourceVector.X, (int)sourceVector.Y, (int)sourceVector.Z, (int)sourceVector.W);
sourceRect = new Rectangle((int)(sourceVector.X * sourceRectScale), (int)(sourceVector.Y * sourceRectScale), (int)(sourceVector.Z * sourceRectScale), (int)(sourceVector.W * sourceRectScale));
size = SourceElement.GetAttributeVector2("size", Vector2.One);
RelativeSize = size;
size.X *= sourceRect.Width;