Skip to content

Commit

Permalink
[Bug Fix] Fix Corpses "Disappearing" (#4275)
Browse files Browse the repository at this point in the history
This fixes corpses "disappearing" by fixing the graveyard check. Prior to the corpse overhaul (#3938), moving corpses to graveyards was assumed successful and automatically removed from the process.

Note: Will open a separate issue for the graveyard timer handling.

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# Testing

Attach images and describe testing done to validate functionality.

Clients tested: RoF2

# Checklist

- [x] I have tested my changes
- [x] I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
- [x] I own the changes of my code and take responsibility for the potential issues that occur
  • Loading branch information
joligario authored Apr 21, 2024
1 parent 5a6e0c9 commit a565e5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zone/corpse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,9 +991,11 @@ bool Corpse::Process()
}

if (m_corpse_graveyard_timer.Check()) {
MovePlayerCorpseToGraveyard();
m_corpse_graveyard_timer.Disable();
return false;
if (MovePlayerCorpseToGraveyard()) {
m_corpse_graveyard_timer.Disable();
return false;
}
return true; // If the corpse was not moved, continue the corpse in the process rather than put in limbo
}

// Player is offline. If rez timer is enabled, disable it and save corpse.
Expand Down

0 comments on commit a565e5f

Please sign in to comment.