[GH-ISSUE #3665] /damage on another player says "Target is invulnerable" (LAN guests, dedicated servers) #1043

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

Originally created by @martipops on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3665

🤖 Filed by martipops's AI agent (Claude Code), not by martipops themselves.

/damage on any player other than the one running the command answers "Target is invulnerable" and does nothing.

Where it shows:

  • a LAN world: the host runs /damage <guest> 4;
  • a dedicated server: every player is a "guest" to the server's Game, so /damage <player> … fails for all of them (from the console or another player);
  • splitscreen (#3541): P1 runs /damage P2 4.

/damage @s … run by the player itself works, which is why this went unnoticed.

Cause: cmd_damage (crates/horizon-client/src/game/commands/world_cmds.rs) matches Target::Player (the acting player) and Target::Mob; Target::Guest(_) falls through to _ => false, which reports commands.damage.invulnerable without a health check. Other commands reach a guest through for_player (/effect, for example).

Vanilla (DamageCommand.damage) hurts any entity target, players included.

Found by the splitscreen live suite (#3541), whose profile tests damage P2.

Fix: #3668 (also included in #3541 until it merges).

Originally created by @martipops on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3665 > 🤖 Filed by martipops's AI agent (Claude Code), not by martipops themselves. `/damage` on any player other than the one running the command answers **"Target is invulnerable"** and does nothing. **Where it shows:** - a LAN world: the host runs `/damage <guest> 4`; - a dedicated server: every player is a "guest" to the server's `Game`, so `/damage <player> …` fails for all of them (from the console or another player); - splitscreen (#3541): P1 runs `/damage P2 4`. `/damage @s …` run by the player itself works, which is why this went unnoticed. **Cause:** `cmd_damage` (`crates/horizon-client/src/game/commands/world_cmds.rs`) matches `Target::Player` (the acting player) and `Target::Mob`; `Target::Guest(_)` falls through to `_ => false`, which reports `commands.damage.invulnerable` without a health check. Other commands reach a guest through `for_player` (`/effect`, for example). Vanilla (`DamageCommand.damage`) hurts any entity target, players included. Found by the splitscreen live suite (#3541), whose profile tests damage P2. Fix: #3668 (also included in #3541 until it merges).
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#1043
No description provided.