Cloning and Paradox Cone height workaround (#6205)
This commit is contained in:
parent
8003517bbc
commit
303e1f4563
|
|
@ -100,6 +100,12 @@ public abstract partial class SharedVisualBodySystem : EntitySystem
|
|||
if (!other.Layer.Equals(ent.Comp.Layer))
|
||||
return;
|
||||
|
||||
// Delta V - Begin Fix Height for Cloning
|
||||
var height = other.Profile.Height;
|
||||
if (TryComp<HumanoidProfileComponent>(args.Body.Owner, out var component))
|
||||
ScaleBody((args.Body.Owner, component), height, height);
|
||||
// Delta V - End
|
||||
|
||||
SetOrganAppearance(ent, other.Data);
|
||||
}
|
||||
|
||||
|
|
@ -112,9 +118,14 @@ public abstract partial class SharedVisualBodySystem : EntitySystem
|
|||
|
||||
var height = Math.Clamp(MathF.Round(args.Base.Value.Height, 2), speciesPrototype.MinHeight, speciesPrototype.MaxHeight);
|
||||
|
||||
ScaleBody(entity, speciesPrototype.ScaleHeight ? height : 1f, height);
|
||||
}
|
||||
|
||||
private void ScaleBody(Entity<HumanoidProfileComponent> entity, float heightX, float heightY)
|
||||
{
|
||||
_scaleVisualsSystem.SetSpriteScale(
|
||||
entity.Owner,
|
||||
new Vector2(speciesPrototype.ScaleHeight ? height : 1f, height)
|
||||
new Vector2(heightX, heightY)
|
||||
);
|
||||
}
|
||||
// Delta V - END
|
||||
|
|
|
|||
Loading…
Reference in New Issue