1
0
mirror of synced 2025-01-30 19:43:47 +01:00

Fix Tower crash if background is missing (#525)

* Fix Tower crash if down background is missing

oopsie

* oh yeah, the up tower too
This commit is contained in:
DragonRatTiger / リュウコ 2023-11-16 05:04:02 -05:00 committed by GitHub
parent 21f8ea4ff6
commit 78c90419e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,9 +156,9 @@ namespace TJAPlayer3
: downDirs[random.Next(0, downDirs.Length)];
DownScript = new ScriptBG($@"{downPath}{Path.DirectorySeparatorChar}Script.lua");
DownScript.Init();
DownScript?.Init();
IsDownNotFound = false;
if (DownScript.Exists()) IsDownNotFound = false;
}
else
{
@ -296,8 +296,8 @@ namespace TJAPlayer3
if (!IsUpNotFound)
{
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) UpScript.Update();
UpScript.Draw();
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) UpScript?.Update();
UpScript?.Draw();
if (TJAPlayer3.stage選曲.n確定された曲の難易度[0] == (int)Difficulty.Tower)
{
#region [Tower animations variables]
@ -643,8 +643,8 @@ namespace TJAPlayer3
{
if (!IsDownNotFound)
{
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) DownScript.Update();
DownScript.Draw();
if (!TJAPlayer3.stage演奏ドラム画面.bPAUSE) DownScript?.Update();
DownScript?.Draw();
}
}