Skip to content
Snippets Groups Projects

Fix segfault when ghost dies from a death pit

Merged Hanicef requested to merge Hanicef/SRB2Classic:fix-death-ghost-segfault into next

When a ghost dies from a death pit, the corresponding mobj is removed even though ghosts keep going after touching one. This triggers a segfault when the game tries to update the now-deleted mobj that the ghost corresponds to. This PR simply fixes this by just ignoring MT_GHOST when a ghost touches a death pit, allowing it to continue as intended.

The easiest way to reproduce this is by simply jumping into a death pit in record attack mode, and then starting a new record attack run with the last played ghost set to shown. Once the ghost touches the death pit, the game segfaults.

Fixes #999 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
Please register or sign in to reply
Loading