Allow the Ynykron to suck in inventory (but not destroy it).
Fix suckable actors self-cleaning.
This commit is contained in:
parent
3c85955d91
commit
0501f876d3
3 changed files with 9 additions and 4 deletions
|
|
@ -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") )
|
||||
|
|
|
|||
|
|
@ -2302,6 +2302,8 @@ Class YnykronSingularity : Actor
|
|||
if ( !a ) continue;
|
||||
if ( a.bDORMANT || (a.Health <= 0) || (a == self) || !SWWMUtility.SphereIntersect(a,pos,20000.*scale.x) || !CheckSight(a,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) )
|
||||
continue;
|
||||
if ( (a is 'Inventory') && !a.bSPECIAL ) // must be a pickup
|
||||
continue;
|
||||
if ( a.player && (a.player.cheats&CF_NOCLIP2) ) // for safety
|
||||
continue;
|
||||
double capmass = a.mass;
|
||||
|
|
@ -2316,6 +2318,9 @@ Class YnykronSingularity : Actor
|
|||
a.Destroy();
|
||||
continue;
|
||||
}
|
||||
// don't delet inventory
|
||||
if ( a is 'Inventory' )
|
||||
continue;
|
||||
// delet missile
|
||||
if ( a.bMISSILE )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue