From 5697acabb33dedf86789cbd9291cd0836707fbc7 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Wed, 6 May 2026 11:22:38 +0300 Subject: [PATCH] Take most recent corpse from tile Fixes crash when taking a corpse on roof when multiple corpses are stacked on one tile. --- Tactical/Rotting Corpses.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tactical/Rotting Corpses.cpp b/Tactical/Rotting Corpses.cpp index 692078d6..691953f5 100644 --- a/Tactical/Rotting Corpses.cpp +++ b/Tactical/Rotting Corpses.cpp @@ -1770,10 +1770,10 @@ BOOLEAN IsValidDecapitationCorpse( ROTTING_CORPSE *pCorpse ) ROTTING_CORPSE *GetCorpseAtGridNo( INT32 sGridNo, INT8 bLevel ) { - STRUCTURE *pStructure, *pBaseStructure; + STRUCTURE *pStructure, *pBaseStructure; INT32 sBaseGridNo; - pStructure = FindStructure( sGridNo, STRUCTURE_CORPSE ); + pStructure = FindLastStructure( sGridNo, STRUCTURE_CORPSE ); if ( pStructure != NULL ) {