Cloning and Paradox Cone height workaround (#6205)

This commit is contained in:
Coryn 2026-07-13 21:58:25 +02:00 committed by GitHub
parent 8003517bbc
commit 303e1f4563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 1 deletions

View File

@ -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