Skip to content

Keep dead bodies down: no leveled rebuild, no health, lay standing corpses back down - #36

Open
absol89 wants to merge 3 commits into
fix/reliability-portingfrom
fix/corpse-stand-up
Open

absol89 wants to merge 3 commits into
fix/reliability-portingfrom
fix/corpse-stand-up

Conversation

@absol89

@absol89 absol89 commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Stacked on #25 (fix/reliability-porting), which holds the remote death system that dev doesn't have yet. This ports the rest of urSovngarde's standing-corpse fix to non-VR.

Changes

Files: CharacterService.cpp/.h, ActorValueService.cpp, RemoteDeathSystem.h

  1. Leveled NPCs: a dead actor is never rebuilt for the owner's leveled pick. This is slightly stricter than urSovngarde's version, which still let a body with no pick be rebuilt.
  2. Health: health broadcasts no longer reach dead remote bodies.
  3. Repair: only while connected, every 2 s, for up to 24 dead NPC bodies within 4096 units (never players). It removes any health, and if the pelvis is 50+ units above the feet and hasn't moved between two looks, it sends RagdollInstant, at most 3 tries per body.
  4. Logging: BodyStand: lines for every repair outcome, Not rebuilding dead actor … and Respawning actor … on spawn for save/server mismatches.

Verified in Ghidra on 1.6.1170

  • IsDead reads only the life state at +0xC8, never health, so a body can be dead and on its feet.
  • IsInRagdollState (37491) is true for any dead actor who isn't reanimating, so it can't detect a standing body. That's why the skeleton is measured.
  • KillImpl (37896) returns early if already dead, so re-killing doesn't help.
  • NiNode GetByName is vtable slot 0x2A (0x140d1d9a0).
  • RagdollInstant exists in 0_master.hkx.

On 1.7.104 I only checked that the IDs resolve.

Not verified yet

  • That health and leveled rebuilds are what make bodies stand. This comes from urSovngarde's VR notes.
  • That RagdollInstant actually lays a dead body down. It had only ever been sent by hand before.
  • The height thresholds, which are taken from urSovngarde's measurements.
  • Limits: creatures without pelvis or foot bones get their health removed but aren't laid down. Posed upright corpses (hanging, furniture) could be dropped.

Test plan

  1. An old save with bodies already standing: BodyStand: … laying it down then … is lying down, and the body falls.
  2. Two clients: A kills a leveled bandit, and B enters, leaves and re-enters. It stays down on both.
  3. Late join after a cleared dungeon: all bodies lie down.
  4. A healing spell on a corpse: it stays down.
  5. A body dead in only one save: Respawning actor … on spawn is logged.
  6. Hanging and furniture corpses still look right.
  7. Single player, not connected: no change and no BodyStand: lines.
  8. Dragging a body isn't interrupted.

Generated by Claude Code

absol89 and others added 3 commits November 5, 2026 23:07
A corpse can stand because it was rebuilt for a leveled pick or got health back,
and saves keep it that way. Keep those from happening to dead actors, and while
connected check nearby bodies for a standing skeleton and ragdoll them, logging
BodyStand lines. Also log a respawn caused by a save disagreeing with the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
The standing body check reads it, and on this branch only the padding was
declared. Same layout as the name tags use on API-playtest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fvQxQEu7yvi9eRZyKsEur
RunRemoteUpdates called Kill() on every tick while the owner had an NPC dead and it was alive here.
When the game refused the kill, that meant about 100 calls and log lines a second until ownership moved
(1300 in 13 seconds in a playtest log). Retry once a second, give up after five tries with one warning,
and start over when the body reloads or dies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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