From 4711dd3258fc768b43c3e503a29fd038c452d749 Mon Sep 17 00:00:00 2001 From: Dennis Postma <dennis@directonline.io> Date: Sun, 15 Sep 2024 20:47:27 +0200 Subject: [PATCH] Removed redundant code --- src/services/zone.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/zone.ts b/src/services/zone.ts index e51a507..d6b08a4 100644 --- a/src/services/zone.ts +++ b/src/services/zone.ts @@ -45,11 +45,11 @@ export const calculateIsometricDepth = (x: number, y: number, width: number = 0, const baseDepth = x + y if (isCharacter) { // Increase the offset for characters to ensure they're always on top - return baseDepth + 0.9 // @TODO: Fix collision, this is a hack - } else { - // For objects, use their back bottom corner - return baseDepth + (width + height) / (2 * config.tile_size.x) + return baseDepth // @TODO: Fix collision, this is a hack } + + // For objects, use their back bottom corner + return baseDepth + (width + height) / (2 * config.tile_size.x) } export const sortByIsometricDepth = <T extends { positionX: number; positionY: number }>(items: T[]) => {