mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-14 21:55:09 +00:00
fix weird edge case in toss boys autodispense
let beataction throw exceptions
This commit is contained in:
parent
dbf28debe0
commit
b4ceb15743
3 changed files with 18 additions and 2 deletions
|
@ -466,8 +466,15 @@ namespace HeavenStudio.Games
|
||||||
if (passBallDict.TryGetValue(beat + lastLength, out var e))
|
if (passBallDict.TryGetValue(beat + lastLength, out var e))
|
||||||
{
|
{
|
||||||
if (e.datamodel == "tossBoys/pop") return;
|
if (e.datamodel == "tossBoys/pop") return;
|
||||||
curReceiver = e["who"];
|
|
||||||
blurSet = e.datamodel == "tossBoys/blur";
|
blurSet = e.datamodel == "tossBoys/blur";
|
||||||
|
if (blurSet)
|
||||||
|
{
|
||||||
|
curReceiver = (int)WhichTossKid.None;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
curReceiver = e["who"];
|
||||||
|
}
|
||||||
currentLength = e.length;
|
currentLength = e.length;
|
||||||
nextIsSpecial = IsSpecialEvent(e.datamodel);
|
nextIsSpecial = IsSpecialEvent(e.datamodel);
|
||||||
eventDatamodel = e.datamodel;
|
eventDatamodel = e.datamodel;
|
||||||
|
|
|
@ -58,7 +58,14 @@ namespace HeavenStudio.Util
|
||||||
if (behaviour == null || !(conductor.isPlaying || conductor.isPaused))
|
if (behaviour == null || !(conductor.isPlaying || conductor.isPaused))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
actions[idx].function.Invoke();
|
try
|
||||||
|
{
|
||||||
|
actions[idx].function.Invoke();
|
||||||
|
}
|
||||||
|
catch (System.Exception e)
|
||||||
|
{
|
||||||
|
Debug.LogError($"Exception thrown while executing BeatAction: {e}");
|
||||||
|
}
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,5 +35,7 @@ MonoBehaviour:
|
||||||
- Assets/Scripts/Games/KarateMan/KarateMan.cs
|
- Assets/Scripts/Games/KarateMan/KarateMan.cs
|
||||||
- Assets/Scripts/Games/KarateMan/KarateManJoe.cs
|
- Assets/Scripts/Games/KarateMan/KarateManJoe.cs
|
||||||
- Assets/Scripts/Games/KarateMan/KarateManNoriController.cs
|
- Assets/Scripts/Games/KarateMan/KarateManNoriController.cs
|
||||||
|
- Assets/Scripts/Util/BeatAction.cs
|
||||||
|
- Assets/Scripts/Games/TossBoys/TossBoys.cs
|
||||||
PathsToSkipImportEvent: []
|
PathsToSkipImportEvent: []
|
||||||
PathsToIgnoreOverwriteSettingOnAttribute: []
|
PathsToIgnoreOverwriteSettingOnAttribute: []
|
||||||
|
|
Loading…
Reference in a new issue