From a1df35ea05a1a4db8e0ba4f76e87abb74cc1f06d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 14 Nov 2022 11:51:29 +0100 Subject: [PATCH] also set source in OffsetCopy --- MLEM/Textures/TextureRegion.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MLEM/Textures/TextureRegion.cs b/MLEM/Textures/TextureRegion.cs index 8fdc743..5b3f472 100644 --- a/MLEM/Textures/TextureRegion.cs +++ b/MLEM/Textures/TextureRegion.cs @@ -60,7 +60,7 @@ namespace MLEM.Textures { public string Name = string.Empty; /// /// A that this texture region was created from. - /// This value is set in the various constructors that accept another to create sub-regions from, as well as by MLEM.Data's RuntimeTexturePacker. + /// This value is set in the various constructors that accept another to create sub-regions from, in , as well as by MLEM.Data's RuntimeTexturePacker. /// public TextureRegion Source; @@ -132,7 +132,10 @@ namespace MLEM.Textures { /// The offset to apply to the /// An offset copy of this texture region public TextureRegion OffsetCopy(Point offset) { - return new TextureRegion(this.Texture, this.Position + offset, this.Size) {Pivot = this.Pivot}; + return new TextureRegion(this.Texture, this.Position + offset, this.Size) { + Pivot = this.Pivot, + Source = this + }; } }