1
0
mirror of synced 2025-02-17 19:09:25 +01:00

Fixed a crash that occurs at the end of konga songs with big notes, oops

This commit is contained in:
0aubsq 2022-05-10 08:55:20 +02:00
parent 39e42fb575
commit 0e14e367ed
2 changed files with 11 additions and 1 deletions

View File

@ -2424,7 +2424,7 @@ namespace TJAPlayer3
}
}
}
#region[ ]
#region [ Treat big notes hit with a single hand ]
//常時イベントが発生しているメソッドのほうがいいんじゃないかという予想。
//CDTX.CChip chipNoHit = this.r指定時刻に一番近い未ヒットChip((int)CSound管理.rc演奏用タイマ.n現在時刻ms, 0);
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)

View File

@ -45,6 +45,8 @@ namespace TJAPlayer3
var inPad = (Eパッド)hit;
var onPad = (Eパッド)stored;
if (chip == null) return false;
if (IsBigKaTaiko(chip, gt))
{
return (inPad == Eパッド.LBlue && onPad == Eパッド.RBlue)
@ -73,35 +75,42 @@ namespace TJAPlayer3
public static bool IsCommonNote(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 >= 0x11 && chip.nチャンネル番号 < 0x18;
}
public static bool IsMine(CDTX.CChip chip)
{
if (chip == null) return false;
return chip.nチャンネル番号 == 0x1C;
}
public static bool IsSmallNote(CDTX.CChip chip, bool blue)
{
if (chip == null) return false;
return blue ? chip.nチャンネル番号 == 0x12 : chip.nチャンネル番号 == 0x11;
}
public static bool IsBigKaTaiko(CDTX.CChip chip, EGameType gt)
{
if (chip == null) return false;
return (chip.nチャンネル番号 == 0x14 || chip.nチャンネル番号 == 0x1B) && gt == EGameType.TAIKO;
}
public static bool IsBigDonTaiko(CDTX.CChip chip, EGameType gt)
{
if (chip == null) return false;
return (chip.nチャンネル番号 == 0x13 || chip.nチャンネル番号 == 0x1A) && gt == EGameType.TAIKO;
}
public static bool IsClapKonga(CDTX.CChip chip, EGameType gt)
{
if (chip == null) return false;
return (chip.nチャンネル番号 == 0x14 || chip.nチャンネル番号 == 0x1B) && gt == EGameType.KONGA;
}
public static bool IsSwapNote(CDTX.CChip chip, EGameType gt)
{
if (chip == null) return false;
return (
((chip.nチャンネル番号 == 0x13 || chip.nチャンネル番号 == 0x1A) && gt == EGameType.KONGA) // Konga Pink note
|| IsPurpleNote(chip, gt) // Purple (Green) note
@ -111,6 +120,7 @@ namespace TJAPlayer3
// Not implemented yet
public static bool IsPurpleNote(CDTX.CChip chip, EGameType gt)
{
if (chip == null) return false;
return false;
}