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.
This commit is contained in:
simoleo89
2026-06-13 16:20:59 +02:00
parent 93baedf206
commit 728eceab65
@@ -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) } ]
: []),