- fix: Height on cline and some stuff

This commit is contained in:
2024-03-17 18:25:52 +03:00
parent eb78be2549
commit 31a548215c
4 changed files with 36 additions and 1 deletions

View File

@@ -15,6 +15,15 @@ public abstract class SharedCustomHeightSystem : EntitySystem
base.Initialize();
SubscribeLocalEvent<CustomHeightComponent,ComponentInit>(OnInit);
SubscribeLocalEvent<CustomHeightComponent,HumanoidAppearanceLoadedEvent>(OnLoaded);
SubscribeLocalEvent<CustomHeightComponent,HumanoidAppearanceClonedEvent>(OnCloned);
}
private void OnCloned(EntityUid uid, CustomHeightComponent component, HumanoidAppearanceClonedEvent args)
{
if(!AppearanceSystem.TryGetData<float>(uid, HeightVisuals.State, out var height))
return;
SetHeight(args.Target.Owner,height);
}
private void OnLoaded(EntityUid uid, CustomHeightComponent component, HumanoidAppearanceLoadedEvent args)