Skip to content

Arrows stay stuck where they hit - #345

Closed
Kharote wants to merge 1 commit into
mainfrom
fix/arrows-stay-stuck
Closed

Kharote wants to merge 1 commit into
mainfrom
fix/arrows-stay-stuck

Conversation

@Kharote

@Kharote Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

What this changes

An arrow that stuck in a target, a wall or a tree fell to the ground. Each client takes its own copy of a landed projectile out of the world, and the server lays the shooter's as a shared ground stack, pinned (no body) when it was stuck. Two things made it fall:

  • The shooter's client counted a landed projectile as stuck only when it had no physics at all (type 0). A projectile stuck in what it hit can keep a static body, so it was reported as lying loose and laid as a normal stack. Now anything but a rigid body (a projectile that fell or bounced) counts as stuck.
  • Every laid stack gets its ground model, and that model comes with a rigid body. A pinned stack now loses the body again once the model is on, so it stays where it hit on every client.

How it was tested

  • New runtime.ranged_landings test: an arrow with a static body and one with no body are reported stuck at their place, and a rigid-bodied one is not. It fails with the old check.
  • format_source.py --check passes.

Checklist

  • I read CONTRIBUTING.md and agree that my contribution is licensed as it says.
  • The change is my own work: no code, assets or dumps that are not mine or that come from the game.
  • python Dev/tools/format_source.py --check passes.
  • Tests cover the change, and the checks of this pull request pass.
  • Public behaviour that changed is documented (KCD-Synced/KCDS-DOCS) or needs no docs.

…s stuck, and a pinned stack loses the body its model gave it
@Kharote Kharote mentioned this pull request Nov 24, 2026
5 tasks done
@Kharote

Kharote commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

Shipped in 1.2.1 (#349, release v1.2.1).

@Kharote Kharote closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant