Reset weapon pickup voicelines only when inventory is wiped.
This commit is contained in:
parent
50b124f1a1
commit
6a6c26f307
5 changed files with 31 additions and 23 deletions
|
|
@ -100,27 +100,8 @@ extend Class SWWMHandler
|
|||
s.GotWeapon(Weapon(i).GetClass());
|
||||
}
|
||||
}
|
||||
else if ( (s.lastcluster != level.cluster) || !(level.clusterflags&LevelLocals.CLUSTER_HUB) || (level.info.flags2&LEVEL2_RESETINVENTORY && !e.IsReturn) )
|
||||
{
|
||||
// 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--;
|
||||
}
|
||||
}
|
||||
else if ( level.info.flags2&LEVEL2_RESETINVENTORY && !e.IsReturn )
|
||||
s.CleanGotWeapons(); // clean up the "got weapons" so their obtain lines are played again
|
||||
// reset some vars
|
||||
multilevel[e.playernumber] = 0;
|
||||
spreecount[e.playernumber] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue