mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Remove corpse structure from world when removing corpse
Fixes not being able to take all corpses from one tile, if multiple corpses were stacked on top of each other. With the structure not deleted, the GetCorpseAtGridNo would not find an existing corpse anymore.
This commit is contained in:
@@ -713,6 +713,10 @@ void RemoveCorpse( INT32 iCorpseID )
|
||||
DeleteAniTile( gRottingCorpse[ iCorpseID ].pAniTile );
|
||||
|
||||
FreeCorpsePalettes( &( gRottingCorpse[ iCorpseID ] ) );
|
||||
|
||||
const auto sGridNo = gRottingCorpse[iCorpseID].def.sGridNo;
|
||||
auto pStructure = FindLastStructure(sGridNo, STRUCTURE_CORPSE);
|
||||
DeleteStructureFromWorld(pStructure);
|
||||
}
|
||||
|
||||
BOOLEAN CreateCorpsePalette( ROTTING_CORPSE *pCorpse )
|
||||
|
||||
Reference in New Issue
Block a user