Do not magnetize swapweapons.
This commit is contained in:
parent
2f22e89fc1
commit
c90671fe29
4 changed files with 17 additions and 2 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r333 \cu(Wed 17 Aug 01:21:38 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r333 \cu(2022-08-17 01:21:38)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r334 \cu(Wed 17 Aug 13:56:36 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r334 \cu(2022-08-17 13:56:36)\c-";
|
||||
|
|
|
|||
|
|
@ -892,6 +892,8 @@ Class Demolitionist : PlayerPawn
|
|||
else if ( i is 'MaGammo' ) cls = MagAmmo(i).GetParentMagAmmo();
|
||||
let oi = FindInventory(cls);
|
||||
if ( !i.bALWAYSPICKUP && oi && (oi.Amount >= oi.MaxAmount) ) continue;
|
||||
if ( (i is 'SWWMWeapon') && SWWMWeapon(i).HasSwapWeapon(self) && swwm_swapweapons ) continue;
|
||||
if ( (i is 'SWWMDualWeaponGiver') && SWWMDualWeaponGiver(i).HasSwapWeapon(self) && swwm_swapweapons ) continue;
|
||||
bool addme = true;
|
||||
for ( SWWMMagItem mi=magitem; mi; mi=mi.next )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -239,6 +239,8 @@ Class SWWMMagItem play
|
|||
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;
|
||||
if ( (item is 'SWWMDualWeaponGiver') && SWWMDualWeaponGiver(item).HasSwapWeapon(target) && swwm_swapweapons ) return true;
|
||||
Vector3 dirto = level.Vec3Diff(item.pos,target.Vec3Offset(0,0,target.height/2));
|
||||
double dist = dirto.length();
|
||||
if ( SWWMUtility.BoxIntersect(item,target) )
|
||||
|
|
|
|||
|
|
@ -603,6 +603,17 @@ Class SWWMDualWeaponGiver : Inventory
|
|||
box.master = self;
|
||||
}
|
||||
|
||||
SWWMWeapon HasSwapWeapon( Actor other ) const
|
||||
{
|
||||
if ( giveme[0].bNoSwapWeapon ) return null;
|
||||
for ( Inventory i=other.inv; i; i=i.inv )
|
||||
{
|
||||
if ( giveme[0].IsSwapWeapon(i) )
|
||||
return SWWMWeapon(i);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
override void Touch( Actor toucher )
|
||||
{
|
||||
// show prompt to swap weapon, and prevent normal pickup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue