diff --git a/Features/Serializable/Schematics/SchematicBlockData.cs b/Features/Serializable/Schematics/SchematicBlockData.cs index 5e2ae64..787fd9e 100644 --- a/Features/Serializable/Schematics/SchematicBlockData.cs +++ b/Features/Serializable/Schematics/SchematicBlockData.cs @@ -53,13 +53,15 @@ public GameObject Create(SchematicObject schematicObject, Transform parentTransf Transform transform = gameObject.transform; transform.SetParent(parentTransform); transform.SetLocalPositionAndRotation(Position, Quaternion.Euler(Rotation)); - - transform.localScale = BlockType switch - { - BlockType.Empty when Scale == Vector3.zero => Vector3.one, - BlockType.Waypoint => Scale * SerializableWaypoint.ScaleMultiplier, - _ => Scale, - }; + + if (BlockType == BlockType.Waypoint) + gameObject.GetComponent().NetworkBoundsSize = Scale; + else + transform.localScale = BlockType switch + { + BlockType.Empty when Scale == Vector3.zero => Vector3.one, + _ => Scale + }; if (gameObject.TryGetComponent(out AdminToyBase adminToyBase)) { diff --git a/Features/Serializable/SerializableWaypoint.cs b/Features/Serializable/SerializableWaypoint.cs index 9f0ef76..f6faf4b 100644 --- a/Features/Serializable/SerializableWaypoint.cs +++ b/Features/Serializable/SerializableWaypoint.cs @@ -11,8 +11,6 @@ namespace ProjectMER.Features.Serializable; public class SerializableWaypoint : SerializableObject, IIndicatorDefinition { - public const float ScaleMultiplier = 1 / 256f; - public override GameObject? SpawnOrUpdateObject(Room? room = null, GameObject? instance = null) { WaypointToy waypoint = instance == null ? GameObject.Instantiate(PrefabManager.Waypoint) : instance.GetComponent(); @@ -21,7 +19,7 @@ public class SerializableWaypoint : SerializableObject, IIndicatorDefinition _prevIndex = Index; waypoint.transform.SetPositionAndRotation(position, rotation); - waypoint.transform.localScale = Scale * ScaleMultiplier; + waypoint.NetworkBoundsSize = Scale; waypoint.NetworkMovementSmoothing = 60; waypoint.NetworkVisualizeBounds = true;