mirror of
https://github.com/vladtrc/iw4L
synced 2026-10-26 02:11:39 -04:00
8d93a3102e
The client kept a corpse's animation tree only while the corpse's tr_time stayed the same. The server changes tr_time whenever a body's fall changes: when it goes over an edge, when it slides down a wall, and when it lands. Each change copied the tree again from the victim, whose tree is already gone because a dead player is not posed, so the corpse got a fresh tree with the death clip back at its first frame. Bodies flew off standing upright in the clip's first 50 ms, stood against walls, and then played the whole fall again where they stopped. The server now stamps each corpse slot with the level time of the death (spawn_time_ms, sent with the corpse pool), and the client keys the tree on that time and the victim. Both stay the same for one body's life and change when the slot holds another body. When there is no victim tree to copy (a body first seen late, or an entity number that now holds another body), the fresh tree starts as far into the death clip as the body is old, so an old body shows the pose it already lies in instead of dying again. The corpse pool's wire format changes, so PROTOCOL_VERSION is 117. Seen on the Mac (mp_favela, point-blank SPAS-12 kills of a bot on an open terrace, with temporary logging): every body copies its tree once and its death clip plays once, from the victim's pose to the end. Before, the same kill copied it 18 times and drew the body upright in the clip's first 50 ms for about 0.8 s. On an iPhone build, point-blank shotgun kills on mp_favela no longer glided off upright, stood pinned to walls or replayed their fall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>