Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent player corpses from being removed during tile cleaning #3205

Merged

Conversation

jeansouzak
Copy link
Contributor

Description

This PR fixes an issue where player corpses were being removed during tile cleaning when a level door closes in the onStepOut movement. The fix ensures that corpses are preserved and not inadvertently deleted when players die, especially in cases where there is not enough room to move the player corpse to a valid position.

Behaviour

Actual

When a player dies in a level door area and there is not enough room to relocate their corpse, the corpse is removed during tile cleaning.

corpse-removed-door.mp4

Expected

When a player dies in a level door area and there is not enough room to relocate their corpse, the corpse should remain intact or relocated and not be deleted.

keep-corpse-when-die-level-door.mp4

Fixes #2226

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

  • Simulated player death in a level door area with no available space for the corpse and ensured the corpse remained intact during the onStepOut movement.
  • Tile cleaning logic when there are additional items alongside the corpse, ensuring only non-corpse items are removed.
  • Dropped an item in a level door area without dying, verifying it was correctly relocated during the onStepOut movement.
  • Different types of corpses (e.g., player vs. creature corpses) to confirm behavior across all cases.
  • Player death when there is enough room for the corpse to be relocated, ensuring proper positioning.

Test Configuration:

  • Server Version: 13.40
  • Client: cipsoft client
  • Operating Server (docker ubuntu), Client (Windows):

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link

sonarqubecloud bot commented Jan 2, 2025

Copy link
Contributor

@FelipePaluco FelipePaluco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks for the contribution!

Do you test with other doors? Just to make sure.. But so far, so good!

You have everything to be merged!

@majestyotbr majestyotbr changed the title fix: prevent player corpses from being removed during tile cleaning w… fix: prevent player corpses from being removed during tile cleaning Jan 2, 2025
@majestyotbr majestyotbr merged commit 15e3f1d into opentibiabr:main Jan 2, 2025
19 checks passed
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.

Gate of Expertise (porta de level) bug
4 participants