fix(client): address PR #54 round 2 — stale comments, D-076 test, GROUND_FLOOR const
Remove stale smoothing re-enable comments from main.gd (Hoshe #1). Add DIALOGUE_MAX_WIDTH=640 regression test (Hoshe #2). Extract GROUND_FLOOR const in tile_renderer (Tyre #3). Clean up entity_renderer migration comment (Hoshe #3). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ const TILE_SIZE: int = Constants.TILE_SIZE
|
||||
const ENTITY_WIDTH: int = 24
|
||||
const ENTITY_HEIGHT: int = 32
|
||||
const ENTITY_OFFSET_X: float = (TILE_SIZE - ENTITY_WIDTH) / 2.0 # center horizontally
|
||||
const ENTITY_OFFSET_Y: float = (TILE_SIZE - ENTITY_HEIGHT) / 2.0 # center vertically for placeholder. Migration: when real sprites land, switch to bottom-anchor (TILE_SIZE - ENTITY_HEIGHT) for correct y-sort ordering.
|
||||
const ENTITY_OFFSET_Y: float = (TILE_SIZE - ENTITY_HEIGHT) / 2.0 # center vertically for placeholder. Migration: switch to bottom-anchor (offset = TILE_SIZE - ENTITY_HEIGHT) when real sprites land for correct y-sort ordering.
|
||||
|
||||
# Lerp speed — framerate-independent exponential smoothing.
|
||||
# At 12.0: ~70% there after 0.1s, ~95% after 0.25s.
|
||||
|
||||
@@ -12,6 +12,7 @@ extends TileMapLayer
|
||||
# (4,0) = reset_plate — amber (#502)
|
||||
|
||||
const TILE_SIZE: int = Constants.TILE_SIZE
|
||||
const GROUND_FLOOR: int = 0 # Server floor level for ground — filter target in update_tiles()
|
||||
|
||||
enum TileType { FLOOR = 0, WALL = 1, DOOR = 2, OBJECT = 3, RESET_PLATE = 4 }
|
||||
|
||||
@@ -78,10 +79,10 @@ func update_tiles(tiles: Array) -> void:
|
||||
if not tile_data.has("x") or not tile_data.has("y") or not tile_data.has("type"):
|
||||
continue
|
||||
|
||||
# Floor-level filter: only render tiles at floor level 0 (ground).
|
||||
# Floor level 1+ tiles are for upper floors (future multi-floor nodes).
|
||||
# Floor-level filter: only render tiles at ground floor.
|
||||
# Upper floor tiles (level 1+) are for future multi-floor nodes.
|
||||
var tile_z: int = tile_data.get("z", 0)
|
||||
if tile_z != 0:
|
||||
if tile_z != GROUND_FLOOR:
|
||||
continue
|
||||
|
||||
var tile_type_str: String = tile_data.type
|
||||
|
||||
Reference in New Issue
Block a user