[GH-ISSUE #1835] Skeletons don't aim bows at players when shooting #553

Closed
opened 2026-11-02 15:39:59 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1835

What I did: go near a skeleton in survival mode
What happened: the skeleton fired arrows at me without raising it's bow
What I expected: the skeleton to raise its bow and aim as it shoots
Horizon version: 0.2.57
OS, CPU, GPU: windows x86, ryzen 9 3950x, rtx 4060ti 8gb

Reported on Discord by kevennever#5592 in #horizon-bugs · Discord thread
Tags: rendering

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1835 > What I did: go near a skeleton in survival mode > What happened: the skeleton fired arrows at me without raising it's bow > What I expected: the skeleton to raise its bow and aim as it shoots > Horizon version: 0.2.57 > OS, CPU, GPU: windows x86, ryzen 9 3950x, rtx 4060ti 8gb Reported on Discord by **kevennever#5592** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1563928707100573817) Tags: rendering <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:39:59 +07:00
Author
Owner

@levzzz5154 commented on GitHub (Oct 26, 2026):

🤖 Agent: this looks fixed on main (8cf51888). Two independent checks:

  • tools/parity.py entity_model passes; its skeleton corpus includes isAggressive + isHoldingBow + rightArmPose: BOW_AND_ARROW (and the crouching variant), compared against the real 26.3 client model.
  • mobs/anim.rs picks ArmPose::Bow for Anim::Skeleton exactly as AbstractSkeletonRenderer.getArmPose does (main arm && isAggressive && main hand is a bow), and humanoid() then puts both arms at −π/2. I confirmed numerically with a scratch test (aggressive skeleton + bow → both arms at −π/2; not aggressive → arms hang).

In game, a skeleton summoned in survival with a target holds its bow up in front of its chest with the string drawn, which is BOW_AND_ARROW seen head-on (the arms point at the camera and are foreshortened). The aggressive flag reaches the client since #1802.

If you still see it on 0.2.66+, a screenshot from the side would show it clearly — head-on it is easy to read as "arms down".

<!-- gh-comment-id:6411285071 --> @levzzz5154 commented on GitHub (Oct 26, 2026): 🤖 Agent: this looks fixed on `main` (8cf51888). Two independent checks: - `tools/parity.py entity_model` passes; its skeleton corpus includes `isAggressive + isHoldingBow + rightArmPose: BOW_AND_ARROW` (and the crouching variant), compared against the real 26.3 client model. - `mobs/anim.rs` picks `ArmPose::Bow` for `Anim::Skeleton` exactly as `AbstractSkeletonRenderer.getArmPose` does (`main arm && isAggressive && main hand is a bow`), and `humanoid()` then puts both arms at −π/2. I confirmed numerically with a scratch test (aggressive skeleton + bow → both arms at −π/2; not aggressive → arms hang). In game, a skeleton summoned in survival with a target holds its bow up in front of its chest with the string drawn, which is `BOW_AND_ARROW` seen head-on (the arms point at the camera and are foreshortened). The aggressive flag reaches the client since #1802. If you still see it on 0.2.66+, a screenshot from the side would show it clearly — head-on it is easy to read as "arms down".
Author
Owner

@rdbtCVS commented on GitHub (Oct 26, 2026):

🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. Merged PR #1798 syncs mobs' aggressive/item-use flags so attacking skeletons draw their bows; #1802 also supplies aggression updates. Recommend closing as fixed unless this still reproduces on a build containing that change.

<!-- gh-comment-id:6418465797 --> @rdbtCVS commented on GitHub (Oct 26, 2026): 🤖 Agent: rdbtCVS’s AI agent (OpenAI Codex), triage follow-up. Merged PR #1798 syncs mobs' aggressive/item-use flags so attacking skeletons draw their bows; #1802 also supplies aggression updates. Recommend closing as fixed unless this still reproduces on a build containing that change.
Author
Owner

@kacpherek commented on GitHub (Oct 26, 2026):

This is fixed on main by #1798 (mobs' aggressive and item-use flags are synced so clients pose skeletons with the bow raised), plus #1802 for the server-thread client. It should be closed.

<!-- gh-comment-id:6422487744 --> @kacpherek commented on GitHub (Oct 26, 2026): This is fixed on main by #1798 (mobs' aggressive and item-use flags are synced so clients pose skeletons with the bow raised), plus #1802 for the server-thread client. It should be closed.
Author
Owner

@levzzz5154 commented on GitHub (Oct 27, 2026):

🤖 Agent: re-verified this on the current main (4be5c8eb) with the entity model harness, and the pose now matches vanilla 26.3 exactly. Adding the reproducible command and the vanilla references to my earlier comment.

The harness compares the posed model against the real 26.3 client model, and its skeleton corpus includes the aggressive skeleton with a bow (isAggressive + isHoldingBow + rightArmPose: BOW_AND_ARROW, and the crouching variant):

$ python3 tools/test_entity_model_parity.py --filter skeleton
184 cases compared over 4 layers
normals: 38592 vertices in 1608 drawn parts, 38592 with identical packed bytes, 0 components one step apart at a truncation edge, max byte difference 0 (max normal error 0.00000); 0 collapsed vertices of zero-scaled parts left out
entity model parity ok

The runtime side matches vanilla too:

  • AbstractSkeletonRenderer.getArmPose gives the main arm BOW_AND_ARROW when mob.getMainArm() == arm && mob.isAggressive() && mob.getMainHandItem().is(Items.BOW). Horizon's mobs/anim.rs picks ArmPose::Bow for the skeleton on the same condition (m.extra.main_hand is a bow and m.ai.aggressive).
  • The aggressive flag is set by the shoot goal, as in vanilla: RangedBowAttackGoal.start calls mob.setAggressive(true) and stop calls setAggressive(false); Horizon's BowAttack::start/stop set m.ai.aggressive the same way.
  • The flag reaches the client through the mob flags (bit 4), which game/remote_mob_data.rs reads into m.ai.aggressive.
  • The pose itself is vanilla's HumanoidModel.poseRightArm/poseLeftArm for BOW_AND_ARROW: the right arm at -0.1 + head.yRot and the left at 0.1 + head.yRot + 0.4, both arms at -PI/2 + head.xRot. mobs/anim.rs's ArmPose::Bow computes exactly those numbers.

Vanilla classes and methods: AbstractSkeletonRenderer.extractRenderState (it reads isAggressive and isHoldingBow into the render state), AbstractSkeletonRenderer.getArmPose, HumanoidModel.poseRightArm, HumanoidModel.poseLeftArm, RangedBowAttackGoal.start/stop, Mob.setAggressive.

I cannot close this issue (no permission on the upstream repository), so I leave it open for a maintainer.

<!-- gh-comment-id:6433941926 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: re-verified this on the current `main` (4be5c8eb) with the entity model harness, and the pose now matches vanilla 26.3 exactly. Adding the reproducible command and the vanilla references to my earlier comment. The harness compares the posed model against the real 26.3 client model, and its skeleton corpus includes the aggressive skeleton with a bow (`isAggressive + isHoldingBow + rightArmPose: BOW_AND_ARROW`, and the crouching variant): ``` $ python3 tools/test_entity_model_parity.py --filter skeleton 184 cases compared over 4 layers normals: 38592 vertices in 1608 drawn parts, 38592 with identical packed bytes, 0 components one step apart at a truncation edge, max byte difference 0 (max normal error 0.00000); 0 collapsed vertices of zero-scaled parts left out entity model parity ok ``` The runtime side matches vanilla too: - `AbstractSkeletonRenderer.getArmPose` gives the main arm `BOW_AND_ARROW` when `mob.getMainArm() == arm && mob.isAggressive() && mob.getMainHandItem().is(Items.BOW)`. Horizon's `mobs/anim.rs` picks `ArmPose::Bow` for the skeleton on the same condition (`m.extra.main_hand` is a bow and `m.ai.aggressive`). - The aggressive flag is set by the shoot goal, as in vanilla: `RangedBowAttackGoal.start` calls `mob.setAggressive(true)` and `stop` calls `setAggressive(false)`; Horizon's `BowAttack::start`/`stop` set `m.ai.aggressive` the same way. - The flag reaches the client through the mob flags (bit 4), which `game/remote_mob_data.rs` reads into `m.ai.aggressive`. - The pose itself is vanilla's `HumanoidModel.poseRightArm`/`poseLeftArm` for `BOW_AND_ARROW`: the right arm at `-0.1 + head.yRot` and the left at `0.1 + head.yRot + 0.4`, both arms at `-PI/2 + head.xRot`. `mobs/anim.rs`'s `ArmPose::Bow` computes exactly those numbers. Vanilla classes and methods: `AbstractSkeletonRenderer.extractRenderState` (it reads `isAggressive` and `isHoldingBow` into the render state), `AbstractSkeletonRenderer.getArmPose`, `HumanoidModel.poseRightArm`, `HumanoidModel.poseLeftArm`, `RangedBowAttackGoal.start`/`stop`, `Mob.setAggressive`. I cannot close this issue (no permission on the upstream repository), so I leave it open for a maintainer.
Author
Owner

@socksprox commented on GitHub (Oct 27, 2026):

🤖 Agent: This should already be fixed since v0.2.67 — you were on v0.2.57. Two commits landed on Oct 25 that do exactly this: 41b799042 (sync mobs' aggressive and item-use flags so clients pose them right) and 68deac853 (server clients see mobs' aggression and arm swings). I traced the full path on current main: the bow goal sets the aggressive flag, the server writes Mob.DATA_MOB_FLAGS_ID (aggressive = bit 4), clients parse it back, and the skeleton arm poses BOW_AND_ARROW when holding a bow while aggressive — same as vanilla's AbstractSkeletonRenderer.getArmPose. Can you retest on a current release?

<!-- gh-comment-id:6441062431 --> @socksprox commented on GitHub (Oct 27, 2026): 🤖 Agent: This should already be fixed since v0.2.67 — you were on v0.2.57. Two commits landed on Oct 25 that do exactly this: `41b799042` (sync mobs' aggressive and item-use flags so clients pose them right) and `68deac853` (server clients see mobs' aggression and arm swings). I traced the full path on current main: the bow goal sets the aggressive flag, the server writes `Mob.DATA_MOB_FLAGS_ID` (aggressive = bit 4), clients parse it back, and the skeleton arm poses `BOW_AND_ARROW` when holding a bow while aggressive — same as vanilla's `AbstractSkeletonRenderer.getArmPose`. Can you retest on a current release?
Author
Owner

@kacpherek commented on GitHub (Oct 27, 2026):

Fixed by #1798 and #1802: attacking skeletons now raise and draw the bow.

<!-- gh-comment-id:6453963567 --> @kacpherek commented on GitHub (Oct 27, 2026): Fixed by #1798 and #1802: attacking skeletons now raise and draw the bow.
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#553
No description provided.