Fix magnetized items being blocked by "monster block" lines.
This commit is contained in:
parent
3a00eac766
commit
f3946f832b
3 changed files with 8 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ Class SWWMMagItem play
|
|||
if ( !item || item.Owner || !item.bSPECIAL || item.bINVISIBLE || !SWWMUtility.SphereIntersect(target,item.pos,800) || !target.CheckSight(item,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) return true;
|
||||
Class<Inventory> cls = item.GetClass();
|
||||
if ( item is 'Ammo' ) cls = Ammo(item).GetParentAmmo();
|
||||
else if ( item is 'MaGammo' ) cls = MagAmmo(item).GetParentMagAmmo();
|
||||
else if ( item is 'MagAmmo' ) cls = MagAmmo(item).GetParentMagAmmo();
|
||||
let oi = target.FindInventory(cls);
|
||||
if ( !item.bALWAYSPICKUP && oi && (oi.Amount >= oi.MaxAmount) ) return true;
|
||||
if ( (item is 'SWWMWeapon') && SWWMWeapon(item).HasSwapWeapon(target) && swwm_swapweapons ) return true;
|
||||
|
|
@ -39,6 +39,8 @@ Class SWWMMagItem play
|
|||
if ( !item ) return;
|
||||
if ( item.bSPECIAL ) item.bNOGRAVITY = item.default.bNOGRAVITY;
|
||||
item.bDROPOFF = item.default.bDROPOFF;
|
||||
item.bSLIDESONWALLS = item.default.bSLIDESONWALLS;
|
||||
item.bNOBLOCKMONST = item.default.bNOBLOCKMONST;
|
||||
item.A_StopSound(CHAN_AMBEXTRA);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ extend Class Demolitionist
|
|||
nmi.next = magitem;
|
||||
i.A_StartSound("misc/magitem",CHAN_AMBEXTRA,CHANF_LOOP,.2,1.,.5);
|
||||
i.bNOGRAVITY = true;
|
||||
i.bDROPOFF = true; // required so items can cross over certain lines
|
||||
i.bDROPOFF = true;
|
||||
i.bSLIDESONWALLS = true;
|
||||
i.bNOBLOCKMONST = true;
|
||||
magitem = nmi;
|
||||
magitem_cnt++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue