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:
parent
f4767ce18b
commit
977d20d103
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue