1
0
forked from noxious/client

Removed redundant code

This commit is contained in:
Dennis Postma 2024-09-15 20:47:27 +02:00
parent f8d3cd1f48
commit 4711dd3258

View File

@ -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[]) => {