From 728eceab65593a559c83c6822868f4c53ddf52f9 Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sat, 13 Jun 2026 16:20:59 +0200 Subject: [PATCH] fix(wired): @altitude shown 100x too large and round-trip-edited wrong `liveState.altitude` is already z*100, but the @altitude inspector rows multiplied by 100 again (showing z*10000). The edit-commit path parses the field back as `parsed / 100` (expecting z*100), so the displayed value and the edit parser disagreed: tweaking the shown number wrote a wildly wrong altitude (clamped to the 40 ceiling). Display the raw `altitude` so it round-trips with the editor. --- src/components/wired-tools/WiredCreatorToolsView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/wired-tools/WiredCreatorToolsView.tsx b/src/components/wired-tools/WiredCreatorToolsView.tsx index 2bd5cf8..e486d28 100644 --- a/src/components/wired-tools/WiredCreatorToolsView.tsx +++ b/src/components/wired-tools/WiredCreatorToolsView.tsx @@ -1181,7 +1181,7 @@ export const WiredCreatorToolsView: FC<{}> = () => { key: '@position_x', value: String(liveState?.positionX ?? 0), editable: canEditInspection }, { key: '@position_y', value: String(liveState?.positionY ?? 0), editable: canEditInspection }, { key: '@rotation', value: String(liveState?.rotation ?? 0), editable: canEditInspection }, - { key: '@altitude', value: String(Math.round((liveState?.altitude ?? 0) * 100)), editable: canEditInspection }, + { key: '@altitude', value: String(liveState?.altitude ?? 0), editable: canEditInspection }, { key: '@is_invisible', value: '0' }, ...(wallItemOffset ? [ { key: '@wallitem_offset', value: wallItemOffset, editable: canEditInspection } ] : []), { key: '@type', value: `${ selectedFurnitureData?.availableForBuildersClub ? 1 : 0 }${ selectedFurnitureData?.availableForBuildersClub ? ' (BC)' : ' (Normal)' }` }, @@ -1294,7 +1294,7 @@ export const WiredCreatorToolsView: FC<{}> = () => { key: '@position_x', value: String(liveState?.positionX ?? 0), editable: canEditSelectedUser }, { key: '@position_y', value: String(liveState?.positionY ?? 0), editable: canEditSelectedUser }, { key: '@direction', value: String(liveState?.direction ?? 0), editable: canEditSelectedUser }, - { key: '@altitude', value: String(Math.round((liveState?.altitude ?? 0) * 100)) }, + { key: '@altitude', value: String(liveState?.altitude ?? 0) }, ...((Number(selectedUser.favouriteGroupId ?? 0) > 0) ? [ { key: '@favourite_group_id', value: String(selectedUser.favouriteGroupId) } ] : []),