fix(client): address PR #22 review — 3 critical bugs, 2 warnings, 8 suggestions
Critical fixes: - fog_state: guard _compute_bounds() against all-invalid tiles (negative Rect2i crash) - fog_shader: read Camera2D zoom dynamically instead of hardcoded Vector2(2,2) - world_radial: set custom_minimum_size in _ready() from spoke geometry Warnings: - fog.gdshader: tighten PERIPHERAL_LOW 0.15→0.55 to match D-059 peripheral band - Extract color_for_entity_kind() to Constants.gd, decouple CursorRenderer from EntityRenderer Documentation: shallow copy assumption, gradual decay TODO, tween guard rationale, fade timing rationale, ToggleInsert TODO, monologue consume-once, hover offset safety, v6 fixture gap TODO. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -128,7 +128,7 @@ func _find_nearest_entity() -> Dictionary:
|
||||
best_dist = dist
|
||||
result.id = entity.entity_id
|
||||
result.kind = entity.get("kind", {}).get("variant", "")
|
||||
result.color = EntityRenderer._color_for_kind(entity)
|
||||
result.color = Constants.color_for_entity_kind(entity)
|
||||
result.offset = (xform * center) - mouse_screen
|
||||
return result
|
||||
|
||||
@@ -191,6 +191,11 @@ func _interpolate() -> void:
|
||||
# --- Drawing ---
|
||||
|
||||
func _draw() -> void:
|
||||
# _hover_offset is computed in _detect_hover() during _process(), not recalculated
|
||||
# here. This is safe because Camera2D (tree sibling, earlier in scene order) applies
|
||||
# its smoothing transform before CursorRenderer._process() reads canvas_transform.
|
||||
# Nothing modifies the canvas transform between _process() and _draw().
|
||||
|
||||
# Bloom pass — wider, semi-transparent glow
|
||||
if _bloom > 0.01:
|
||||
var bloom_mod := 1.0
|
||||
|
||||
Reference in New Issue
Block a user