From c73c9b5cc70ba1f19764a1831f457ec0a15c07e2 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 2 Apr 2026 23:31:17 +0200 Subject: [PATCH] Refactor entity position resolution logic in App.tsx --- src/app/App.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 49d03689..461e1cb0 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1523,19 +1523,8 @@ export function App({ store, initialStatusMessage }: AppProps) { }; const resolveNewEntityPosition = (kind: EntityKind): Vec3 => { - if (selectedBrush !== null) { - if (kind === "triggerVolume") { - return snapVec3ToGrid(selectedBrush.center, DEFAULT_GRID_SIZE); - } - - return snapVec3ToGrid( - { - x: selectedBrush.center.x, - y: selectedBrush.center.y + selectedBrush.size.y * 0.5, - z: selectedBrush.center.z - }, - DEFAULT_GRID_SIZE - ); + if (kind === "triggerVolume" && selectedBrush !== null) { + return snapVec3ToGrid(selectedBrush.center, DEFAULT_GRID_SIZE); } if (selectedEntity !== null) {