Stuff from master.
This commit is contained in:
parent
5b91674202
commit
12911c652c
3 changed files with 54 additions and 2 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r14 \cu(Sat 9 Oct 21:32:20 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.2pre r14 \cu(2021-10-09 21:32:20)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.2pre r15 \cu(Sat 9 Oct 21:35:13 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.2pre r15 \cu(2021-10-09 21:35:13)\c-";
|
||||
|
|
|
|||
|
|
@ -107,6 +107,27 @@ extend Class SWWMHandler
|
|||
s.GotWeapon(Weapon(i).GetClass());
|
||||
}
|
||||
}
|
||||
else if ( (s.lastcluster != level.cluster) || !(level.clusterflags&LevelLocals.CLUSTER_HUB) )
|
||||
{
|
||||
// clear the "weapon got" lists for weapons we don't have anymore (unless we're in a hub)
|
||||
// so the obtain lines play again
|
||||
for ( int i=0; i<s.alreadygot.Size(); i++ )
|
||||
{
|
||||
// special case for dual weapons
|
||||
String cn = s.alreadygot[i].GetClassName();
|
||||
if ( (cn.Left(4) ~== "Dual") )
|
||||
{
|
||||
int ss = p.mo.CountInv(GetDefaultByType(s.alreadygot[i]).SisterWeaponType);
|
||||
if ( ss == 2 ) continue;
|
||||
s.alreadygot.Delete(i);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
if ( p.mo.FindInventory(s.alreadygot[i]) ) continue;
|
||||
s.alreadygot.Delete(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
// reset some vars
|
||||
multilevel[e.playernumber] = 0;
|
||||
spreecount[e.playernumber] = 0;
|
||||
|
|
|
|||
|
|
@ -1904,8 +1904,39 @@ Class SWWMUtility
|
|||
return Random[Replacements](weight1,0)?a:Random[Replacements](weight2,0)?b:c;
|
||||
}
|
||||
|
||||
// boy, this one got complicated fast
|
||||
static Class<Inventory> PickSWWMSlot1()
|
||||
{
|
||||
// so the player can recover it if they decided to drop it in a previous map, or they didn't start with it
|
||||
if ( CheckNeedsItem('DeepImpact') ) return 'DeepImpact';
|
||||
bool needsmelee = CheckNeedsItem('PusherWeapon')/*|CheckNeedsItem('ItamexHammer')|CheckNeedsItem('FistGun')*/;
|
||||
bool needsgun = CheckNeedsItem('ExplodiumGun',true)/*|CheckNeedsItem('PlasmaBlast',true)*/;
|
||||
if ( !needsmelee && !needsgun )
|
||||
{
|
||||
static const Class<Weapon> wpns[] =
|
||||
{
|
||||
'ExplodiumGun', 'PusherWeapon',
|
||||
'PlasmaBlast', 'ItamexHammer',
|
||||
'FistGun'
|
||||
};
|
||||
//return wpns[Random[Replacements](0,4)];
|
||||
//return wpns[Random[Replacements](0,3)];
|
||||
return wpns[Random[Replacements](0,1)];
|
||||
}
|
||||
if ( !needsmelee && needsgun )
|
||||
{
|
||||
bool needsexplo = CheckNeedsItem('ExplodiumGun',true);
|
||||
bool needsblast = CheckNeedsItem('PlasmaBlast',true);
|
||||
if ( needsexplo && !needsblast ) return 'ExplodiumGun';
|
||||
if ( !needsexplo && needsblast ) return 'PlasmaBlast';
|
||||
return Random[Replacements](0,1)?'ExplodiumGun':'PlasmaBlast';
|
||||
}
|
||||
if ( needsmelee && !needsgun )
|
||||
{
|
||||
//return PickTrio('PusherWeapon','ItamexHammer','FistGun');
|
||||
//return PickPair('PusherWeapon','ItamexHammer');
|
||||
return 'PusherWeapon';
|
||||
}
|
||||
if ( CheckNeedsItem('ExplodiumGun',true) && Random[Replacements](0,1) ) return 'ExplodiumGun';
|
||||
//if ( CheckNeedsItem('PlasmaBlast',true) && Random[Replacements](0,1) ) return 'PlasmaBlast';
|
||||
//return PickTrio('PusherWeapon','ItamexHammer','FistGun');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue