Skip to content

Collisions: running close past a person no longer costs stamina or health - #338

Closed
Kharote wants to merge 1 commit into
mainfrom
fix/run-past-npc-stamina
Closed

Kharote wants to merge 1 commit into
mainfrom
fix/run-past-npc-stamina

Conversation

@Kharote

@Kharote Kharote commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Players running close past an NPC (a guard) lost stamina, then health, as if hit, though the NPC never attacked. The game takes stamina for a bump of two bodies as for a blow. KCDS already makes a bump of the local player cost nothing (the collision's velocities made still before the game rates it), but only while both bodies move no faster than 4.5 m/s, a jog; a run or a sprint on foot is faster, so brushing past a person at a run still cost.

  • The limit is 8 m/s, above a sprint on foot. A horse at a canter or faster still tramples.

How it was tested

Kit, one game: the player sprinted 8 m straight through a standing NPC, stamina and health logged twice a second. The client logged the bump and kept the stamina (COLLISION bump: the local player keeps state 1 at 119.07); stamina fell only by the sprint's own drain (126.7 to 116.3 over 3 s, back to 126.7 after), health stayed 100. Before, a bump at a sprint cost 24.5 stamina at once.

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.

@Kharote
Kharote marked this pull request as ready for review November 24, 2026 11:34
@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