[PR #190] [MERGED] Match crosshair alpha cutoff and ready-target checks #2394

Closed
opened 2026-11-02 15:55:37 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/190
Author: @Online5277
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @ludovic111

Base: main ← Head: fix/crosshair-attack-indicator


📝 Commits (2)

  • 2f34bf7 Invert crosshair rendering and show attack cooldown indicators
  • e08687f Merge main and retain remaining crosshair parity fixes

📊 Changes

3 files changed (+84 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game/hand.rs (+64 -2)
📝 crates/horizon-client/src/hud.rs (+15 -3)
📝 crates/horizon-client/src/hud.wgsl (+5 -0)

📄 Description

Follow up on #196 with the three crosshair behaviors still missing on main:

  • Use a dedicated crosshair fragment entry that discards only zero alpha. The normal HUD retains its existing 0.004 cutoff and glint handling.
  • Gate the ready icon on the active stack's merged minecraft:attack_range component, including stack overrides/removals, survival/creative bounds, codec defaults and inclusive float-margin arithmetic.
  • Treat dragon_hit() results as obstructions rather than living targets: that helper returns dragon parts and End crystals. A nonliving hit at or before the living target suppresses the icon.

Main's inverting blend, draw ranges, attack-strength wiring, full-indicator helper and expanded HUD harness are retained. The net diff against main is limited to hand.rs, hud.rs and hud.wgsl.

Validation: focused HUD tests including the existing draw-range regression and actual shader parsing/validation; attack-range boundary/default tests; warning-denied client all-target Clippy; formatting, whitespace and public-tree checks.

No game window, preview rebuild or native HUD corpus rerun. Target selection retains the existing ray reach and LAN guest-picking limits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/190 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/crosshair-attack-indicator` --- ### 📝 Commits (2) - [`2f34bf7`](https://github.com/horizon-rust/horizon/commit/2f34bf7b4665378abe88882a6ed2b5e53073939b) Invert crosshair rendering and show attack cooldown indicators - [`e08687f`](https://github.com/horizon-rust/horizon/commit/e08687f362ad918e604a8961f2d53712941600fe) Merge main and retain remaining crosshair parity fixes ### 📊 Changes **3 files changed** (+84 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/hand.rs` (+64 -2) 📝 `crates/horizon-client/src/hud.rs` (+15 -3) 📝 `crates/horizon-client/src/hud.wgsl` (+5 -0) </details> ### 📄 Description Follow up on #196 with the three crosshair behaviors still missing on main: - Use a dedicated crosshair fragment entry that discards only zero alpha. The normal HUD retains its existing `0.004` cutoff and glint handling. - Gate the ready icon on the active stack's merged `minecraft:attack_range` component, including stack overrides/removals, survival/creative bounds, codec defaults and inclusive float-margin arithmetic. - Treat `dragon_hit()` results as obstructions rather than living targets: that helper returns dragon parts and End crystals. A nonliving hit at or before the living target suppresses the icon. Main's inverting blend, draw ranges, attack-strength wiring, full-indicator helper and expanded HUD harness are retained. The net diff against main is limited to `hand.rs`, `hud.rs` and `hud.wgsl`. Validation: focused HUD tests including the existing draw-range regression and actual shader parsing/validation; attack-range boundary/default tests; warning-denied client all-target Clippy; formatting, whitespace and public-tree checks. No game window, preview rebuild or native HUD corpus rerun. Target selection retains the existing ray reach and LAN guest-picking limits. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2394
No description provided.