ShouldSpawnDualExpl() must also check travelling inventory.

This commit is contained in:
Mari the Deer 2020-11-07 10:26:31 +01:00
commit 37d97d0f7f
2 changed files with 10 additions and 1 deletions

View file

@ -1584,6 +1584,15 @@ Class SWWMHandler : EventHandler
private bool ShouldSpawnDualExpl()
{
int np = 0, ng = 0;
// check travelling items, in case this was called mid-transition
let ti = ThinkerIterator.Create("ExplodiumGun",Thinker.STAT_TRAVELLING);
ExplodiumGun g;
while ( g = ExplodiumGun(ti.Next()) )
{
np++;
if ( g.Amount > 1 ) ng++;
}
if ( np > 0 ) return (ng < np);
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || !players[i].mo ) continue;