Slight tweaks to item spawn location

This commit is contained in:
Sally Coolatta 2020-11-01 23:46:26 -05:00
parent 91ed67bece
commit a011278dd4

View file

@ -449,19 +449,20 @@ void K_RunPaperItemSpawners(void)
}
}
for (i = starti; i < min(item, pcount); i++)
for (i = starti; i < min(item + starti, pcount); i++)
{
UINT8 r = P_RandomRange(0, item-1);
UINT8 r = P_RandomKey(item);
UINT8 recursion = 0;
mobj_t *drop = NULL;
SINT8 flip = 1;
while (spotUsed[r] == true)
{
r = P_RandomRange(0, item-1);
r = P_RandomKey(item);
if ((recursion++) > 32)
if ((recursion++) > MAXITEM)
{
// roll with it anyway I guess
break;
}
}