diff --git a/QSB/Animation/Player/AnimationSync.cs b/QSB/Animation/Player/AnimationSync.cs index 8620c835..0971f5e6 100644 --- a/QSB/Animation/Player/AnimationSync.cs +++ b/QSB/Animation/Player/AnimationSync.cs @@ -34,7 +34,11 @@ public class AnimationSync : PlayerSyncObject RequestInitialStatesMessage.SendInitialState += SendInitialState; } - protected void OnDestroy() => RequestInitialStatesMessage.SendInitialState -= SendInitialState; + protected void OnDestroy() + { + RequestInitialStatesMessage.SendInitialState -= SendInitialState; + GlobalMessenger.RemoveListener("EnableBigHeadMode", new Callback(OnEnableBigHeadMode)); + } /// /// This wipes the NetworkAnimator's fields, so it assumes the parameters have changed. @@ -98,6 +102,8 @@ public class AnimationSync : PlayerSyncObject Delay.RunWhen(() => Player.CameraBody != null, () => body.GetComponent().Init(Player.CameraBody.transform)); + + GlobalMessenger.AddListener("EnableBigHeadMode", new Callback(OnEnableBigHeadMode)); } private void InitAccelerationSync() @@ -107,6 +113,12 @@ public class AnimationSync : PlayerSyncObject Player.JetpackAcceleration.Init(thrusterModel); } + private void OnEnableBigHeadMode() + { + var bone = GetComponent().GetBoneTransform(HumanBodyBones.Head); + bone.localScale = new Vector3(2.5f, 2.5f, 2.5f); + } + public void SetSuitState(bool suitedUp) { if (!Player.IsReady)