(fc1332bcb) Fixed structures getting scaled incorrectly when cloning a structure with a non-default scale in the sub editor
This commit is contained in:
@@ -366,14 +366,18 @@ namespace Barotrauma
|
||||
|
||||
public override MapEntity Clone()
|
||||
{
|
||||
var clone = new Structure(rect, Prefab, Submarine);
|
||||
var clone = new Structure(rect, Prefab, Submarine)
|
||||
{
|
||||
defaultRect = defaultRect
|
||||
};
|
||||
foreach (KeyValuePair<string, SerializableProperty> property in SerializableProperties)
|
||||
{
|
||||
if (!property.Value.Attributes.OfType<Editable>().Any()) continue;
|
||||
if (!property.Value.Attributes.OfType<Editable>().Any()) { continue; }
|
||||
clone.SerializableProperties[property.Key].TrySetValue(clone, property.Value.GetValue(this));
|
||||
}
|
||||
if (FlippedX) clone.FlipX(false);
|
||||
if (FlippedY) clone.FlipY(false);
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user