This commit is contained in:
Rapandrasmus 2023-08-12 05:32:22 +02:00 committed by GitHub
parent 8b5fc95417
commit 6ffd94ee39
2 changed files with 13 additions and 10 deletions

View file

@ -818,15 +818,18 @@ namespace HeavenStudio.Games
if (moveCamera) instance.MoveCamera(beat - 1); if (moveCamera) instance.MoveCamera(beat - 1);
instance.StartInterval(beat, length, beat, autoPassTurn, movePass); instance.StartInterval(beat, length, beat, autoPassTurn, movePass);
} }
if (moveCamera) queuedCameraEvents.Add(beat - 1); else
queuedIntervals.Add(new QueuedInterval()
{ {
beat = beat, queuedIntervals.Add(new QueuedInterval()
length = length, {
autoPassTurn = autoPassTurn, beat = beat,
moveCamera = moveCamera, length = length,
moveCameraPass = movePass autoPassTurn = autoPassTurn,
}); moveCamera = moveCamera,
moveCameraPass = movePass
});
}
if (moveCamera) queuedCameraEvents.Add(beat - 1);
} }
private void MoveCamera(double beat) private void MoveCamera(double beat)
@ -899,7 +902,7 @@ namespace HeavenStudio.Games
} }
}), }),
}); });
if (autoPassTurn) PassTurn(beat + length, moveCamera, beat, length); if (autoPassTurn && beat + (length * 2) > gameSwitchBeat) PassTurn(beat + length, moveCamera, beat, length);
} }
public void Riff(double beat, float length, int[] pitches, bool gleeClubJJ, int sampleJJ, int sampleTonesJJ, bool noRespond) public void Riff(double beat, float length, int[] pitches, bool gleeClubJJ, int sampleJJ, int sampleTonesJJ, bool noRespond)

View file

@ -276,7 +276,7 @@ namespace HeavenStudio.Games
double goodBeat = tempEvents[0].beat + tempEvents[0].length; double goodBeat = tempEvents[0].beat + tempEvents[0].length;
for (int i = 1; i < tempEvents.Count; i++) for (int i = 1; i < tempEvents.Count; i++)
{ {
if (tempEvents[i].beat != goodBeat) if (tempEvents[i].beat < goodBeat)
{ {
tempEvents2.Add(tempEvents[i]); tempEvents2.Add(tempEvents[i]);
} }