Fix hardreset() not resetting all 50 (custom)collect slots

There's actually 50 slots allocated in obj.collect and
obj.customcollect, meaning you can have 50 trinkets/coins and crewmates
without Bad Things like writing past array bounds. However, the only
problem with using 50 trinkets/coins or crewmates is the fact that when
you start a custom level or a new main game, IDs above 19 don't get
reset. This patch fixes that by making sure IDs 19-49 properly get
reset.
This commit is contained in:
Info Teddy 2020-01-10 22:35:13 -08:00
parent f4767ce18b
commit 977d20d103
1 changed files with 1 additions and 1 deletions

View File

@ -3536,7 +3536,7 @@ void scriptclass::hardreset( KeyPoll& key, Graphics& dwgfx, Game& game,mapclass&
obj.customcrewmoods[i]=1;
}
for (i = 0; i < 20; i++)
for (i = 0; i < 50; i++)
{
obj.collect[i] = 0;
obj.customcollect[i] = 0;