Fix creature corpse teleport during removal#356
Merged
Conversation
Creature::RemoveCorpse() relocates the creature to its respawn coordinates before forcing corpse removal visibility. A second UpdateObjectVisibility() after restoring visibility could cause clients to see the corpse recreated at the respawn point before the creature was actually alive again. Remove the second visibility update so the corpse is removed from normal client view without being recreated at the respawn location. The internal relocation remains in place for respawn/grid state. Tested: - world creature corpse decay - manual .die + .respawn - automatic respawn at spawn point - normal-player visibility with GM mode off - Stockades instance trash respawn - level-ranged respawn without visible level-up effect
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a creature corpse visibility issue where corpses could appear to snap or reappear at their respawn point during corpse cleanup.
Creature::RemoveCorpse()relocates the creature to its respawn coordinates before forcing corpse-removal visibility. The follow-upUpdateObjectVisibility()after restoring visibility could recreate the still-dead object for clients at the respawn position.This removes that second visibility update while keeping the internal relocation required for respawn/grid state.
This also mitigates the known creature level-up visual/sound artifact for normal players during respawn, because the corpse/object is no longer recreated through the extra visibility update before the live respawn.
Behavior
Before:
After:
Testing
Verified locally:
.die+.respawn.Notes
.gm onmay still observe the hidden corpse/object state at the respawn point. Normal players do not see the corpse teleport/reappear.This change is