[PR #6554] [MERGED] Tamed wolves defend and help a guest owner #6947

Closed
opened 2026-11-03 06:30:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6554
Author: @xFedeT
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/guest-owner-hurt


📝 Commits (1)

  • 4e19829 Tamed wolves defend and help a guest owner: keep the guest's last attacker and victim in their view

📊 Changes

1 file changed (+28 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_mobs.rs (+28 -10)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Fixes #6020 (the part about tamed dogs not attacking; the tails are not touched)

OwnerHurtByTargetGoal and OwnerHurtTargetGoal (mobs/tame.rs) read the owner's last attacker and last victim from the owner's PlayerView. lan_guest_views built that view for every guest and then set hurt_by and last_hurt to None ("what the host alone tracks stays out"). The window's own player is a guest of its server thread, which is the default single player path, so a tamed wolf never defended its owner nor joined an attack. (The same fields feed mobs/caravan.rs, the llama caravan's defence of its owner.)

The guest's player_view is taken with their state swapped in (as_guest swaps Game.combat for the guest's own tracker), so both fields already hold that guest's values. They now stay. The rest of the clean-up moves into guest_view.

Test: a_guests_view_keeps_who_hurt_them_and_who_they_hurt. cargo clippy -p horizon-client --tests. I did not run a wolf fight end to end (tools/lan_e2e.py needs the vanilla data in .local/).

🤖 Generated with Claude Code


🔄 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/6554 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/guest-owner-hurt` --- ### 📝 Commits (1) - [`4e19829`](https://github.com/horizon-rust/horizon/commit/4e1982901584ec9247b466999fff4fe246a55e6c) Tamed wolves defend and help a guest owner: keep the guest's last attacker and victim in their view ### 📊 Changes **1 file changed** (+28 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_mobs.rs` (+28 -10) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Fixes #6020 (the part about tamed dogs not attacking; the tails are not touched) `OwnerHurtByTargetGoal` and `OwnerHurtTargetGoal` (`mobs/tame.rs`) read the owner's last attacker and last victim from the owner's `PlayerView`. `lan_guest_views` built that view for every guest and then set `hurt_by` and `last_hurt` to `None` ("what the host alone tracks stays out"). The window's own player is a guest of its server thread, which is the default single player path, so a tamed wolf never defended its owner nor joined an attack. (The same fields feed `mobs/caravan.rs`, the llama caravan's defence of its owner.) The guest's `player_view` is taken with their state swapped in (`as_guest` swaps `Game.combat` for the guest's own tracker), so both fields already hold that guest's values. They now stay. The rest of the clean-up moves into `guest_view`. Test: `a_guests_view_keeps_who_hurt_them_and_who_they_hurt`. `cargo clippy -p horizon-client --tests`. I did not run a wolf fight end to end (`tools/lan_e2e.py` needs the vanilla data in `.local/`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:30:01 +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#6947
No description provided.