Clear global shine bag on new speedrun

This commit is contained in:
Sanae 2022-03-31 15:34:08 -06:00
parent b3686e8197
commit 6224234272
1 changed files with 3 additions and 3 deletions

View File

@ -82,10 +82,10 @@ server.PacketHandler = (c, p) => {
switch (gamePacket.Stage) {
case "CapWorldHomeStage" when gamePacket.ScenarioNum == 0:
c.Metadata["speedrun"] = true;
ConcurrentBag<int> clientBag = (ConcurrentBag<int>) (c.Metadata["shineSync"] ??= new ConcurrentBag<int>());
clientBag.Clear();
((ConcurrentBag<int>) (c.Metadata["shineSync"] ??= new ConcurrentBag<int>())).Clear();
shineBag.Clear();
break;
case "WaterfallWorldHomeStage" when gamePacket.ScenarioNum >= 0:
case "WaterfallWorldHomeStage":
bool wasSpeedrun = (bool) c.Metadata["speedrun"]!;
c.Metadata["speedrun"] = false;
if (wasSpeedrun)