Unstable 0.1500.5.0 (almost forgor edition 💀)

This commit is contained in:
Markus Isberg
2021-10-01 23:56:14 +09:00
parent 3043a9a7bc
commit 08bdfc6cea
150 changed files with 5669 additions and 4403 deletions
@@ -151,6 +151,12 @@ namespace Barotrauma
{
sourceVector = overrideElement.GetAttributeVector4("sourcerect", Vector4.Zero);
}
if ((overrideElement ?? SourceElement).Attribute("sheetindex") != null)
{
Point sheetElementSize = (overrideElement ?? SourceElement).GetAttributePoint("sheetelementsize", Point.Zero);
Point sheetIndex = (overrideElement ?? SourceElement).GetAttributePoint("sheetindex", Point.Zero);
sourceVector = new Vector4(sheetIndex.X * sheetElementSize.X, sheetIndex.Y * sheetElementSize.Y, sheetElementSize.X, sheetElementSize.Y);
}
Compress = SourceElement.GetAttributeBool("compress", true);
bool shouldReturn = false;
if (!lazyLoad)
@@ -294,6 +300,12 @@ namespace Barotrauma
{
sourceRect = overrideElement.GetAttributeRect("sourcerect", Rectangle.Empty);
}
if ((overrideElement ?? SourceElement).Attribute("sheetindex") != null)
{
Point sheetElementSize = (overrideElement ?? SourceElement).GetAttributePoint("sheetelementsize", Point.Zero);
Point sheetIndex = (overrideElement ?? SourceElement).GetAttributePoint("sheetindex", Point.Zero);
sourceRect = new Rectangle(sheetIndex.X * sheetElementSize.X, sheetIndex.Y * sheetElementSize.Y, sheetElementSize.X, sheetElementSize.Y);
}
size = SourceElement.GetAttributeVector2("size", Vector2.One);
size.X *= sourceRect.Width;
size.Y *= sourceRect.Height;