[PR #2373] [MERGED] Raiders recruit only while the raid pathfinding goal runs #4253

Closed
opened 2026-11-03 04:15:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2373
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/raid-recruit-needs-goal


📝 Commits (2)

  • 7d7a85d Recruit nearby raiders only while the raid pathfinding goal runs
  • 4a8cb8c Merge remote-tracking branch 'origin/main' into HEAD

📊 Changes

2 files changed (+19 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/game/raids.rs (+4 -6)
📝 crates/horizon-client/src/mobs/raider.rs (+15 -4)

📄 Description

What and why

A raider in an active raid recruited other nearby raiders every 20 ticks, even while fighting a target or riding a ravager. In vanilla the recruiting happens inside PathfindToRaidGoal.tick, and that goal only starts when the raider has no target and no controlling passenger.

The goal's tick now sets a flag every 20 ticks (recruitment_tick, like vanilla). The raid bookkeeping recruits only when that flag is set, instead of on a plain age % 20 timer.

Vanilla reference

  • PathfindToRaidGoal.canUse: getTarget() == null && !hasControllingPassenger() && hasActiveRaid() && !isOver() && !isVillage
  • PathfindToRaidGoal.tick: tickCount > recruitmentTick then recruitmentTick = tickCount + 20; recruitNearby(raid)
  • PathfindToRaidGoal.recruitNearby: only if (raid.isActive())

Self-check

cargo check -p horizon-client passes.


🔄 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/2373 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/raid-recruit-needs-goal` --- ### 📝 Commits (2) - [`7d7a85d`](https://github.com/horizon-rust/horizon/commit/7d7a85d1845d0ef2f7ff8a2866f92054f68a732e) Recruit nearby raiders only while the raid pathfinding goal runs - [`4a8cb8c`](https://github.com/horizon-rust/horizon/commit/4a8cb8c4f99082f53f011609a7f2f3f6860874c3) Merge remote-tracking branch 'origin/main' into HEAD ### 📊 Changes **2 files changed** (+19 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/raids.rs` (+4 -6) 📝 `crates/horizon-client/src/mobs/raider.rs` (+15 -4) </details> ### 📄 Description ## What and why A raider in an active raid recruited other nearby raiders every 20 ticks, even while fighting a target or riding a ravager. In vanilla the recruiting happens inside `PathfindToRaidGoal.tick`, and that goal only starts when the raider has no target and no controlling passenger. The goal's tick now sets a flag every 20 ticks (`recruitment_tick`, like vanilla). The raid bookkeeping recruits only when that flag is set, instead of on a plain `age % 20` timer. ## Vanilla reference - `PathfindToRaidGoal.canUse`: `getTarget() == null && !hasControllingPassenger() && hasActiveRaid() && !isOver() && !isVillage` - `PathfindToRaidGoal.tick`: `tickCount > recruitmentTick` then `recruitmentTick = tickCount + 20; recruitNearby(raid)` - `PathfindToRaidGoal.recruitNearby`: only `if (raid.isActive())` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:49 +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#4253
No description provided.