Allow the Ynykron to suck in inventory (but not destroy it).

Fix suckable actors self-cleaning.
This commit is contained in:
Mari the Deer 2021-03-19 22:15:10 +01:00
commit 0501f876d3
3 changed files with 9 additions and 4 deletions

View file

@ -197,7 +197,7 @@ extend Class SWWMHandler
override void WorldThingDestroyed( WorldEvent e )
{
if ( !e.Thing.default.bSHOOTABLE || !e.Thing.default.bMISSILE )
if ( !e.Thing.default.bSHOOTABLE && !e.Thing.default.bMISSILE && !(e Thing is 'Inventory') )
return;
// remove from suckables
int pos = suckableactors.Find(e.Thing);
@ -343,7 +343,7 @@ extend Class SWWMHandler
SWWMShadow.Track(e.Thing);
}
// Ynykron vortex optimization (faster than a thinker iterator)
if ( e.Thing.bSHOOTABLE || e.Thing.bMISSILE )
if ( e.Thing.bSHOOTABLE || e.Thing.bMISSILE || (e.Thing is 'Inventory') )
SuckableActors.Push(e.Thing);
// vanilla blood color changes
if ( (e.Thing.GetClass() == "BaronOfHell") || (e.Thing.GetClass() == "HellKnight") || (e.Thing.GetClass() == "Bishop") || (e.Thing.GetClass() == "Korax") )