Skip to content

Commit

Permalink
Fix bug with shared upgrades array after cloning a structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Dec 20, 2024
1 parent f1eb35a commit 9d5eac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/TSMapEditor/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace TSMapEditor
{
public static class Constants
{
public const string ReleaseVersion = "1.3.7";
public const string ReleaseVersion = "1.3.8";

public static int CellSizeX = 48;
public static int CellSizeY = 24;
Expand Down
2 changes: 2 additions & 0 deletions src/TSMapEditor/Models/Structure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ public override Structure Clone()
{
var clone = MemberwiseClone() as Structure;

clone.Upgrades = Upgrades.ToArray();

clone.Anims = Anims.Select(anim => anim.Clone() as Animation).ToArray();
foreach (var anim in clone.Anims)
anim.ParentBuilding = clone;
Expand Down

0 comments on commit 9d5eac8

Please sign in to comment.