Small Bugfixes (#95)

* Fix Sheets issue 11

* Textboxes: Fix unicode glyphs sometimes not displaying

* Fan Club: fix order of operation bug

* Conductor: refactor ReportBeat

this fixes issues with using crop stomp alongside tempo changes

* Built to Scale (Gold): temporarily disable post-processing

game renders very incorrectly due to the post processing effects
will need someone who knows what they're doing in that field to fix it proper

* marked some assets for deletion

* I'm dumb and left in debug prints
This commit is contained in:
minenice55
2022-06-08 23:35:15 -04:00
committed by GitHub
parent bd6f3ee23d
commit b039ff219a
21 changed files with 2418 additions and 1425 deletions

View File

@ -189,23 +189,20 @@ namespace HeavenStudio
{
Util.Jukebox.PlayOneShot("metronome");
}
else if (songPosition <= lastReportedBeat)
else if (songPositionInBeats < lastReportedBeat)
{
lastReportedBeat = (songPosition - (songPosition % secPerBeat));
lastReportedBeat = Mathf.Round(songPositionInBeats);
}
}
}
}
public bool ReportBeat(ref float lastReportedBeat, float offset = 0, bool shiftBeatToOffset = false)
public bool ReportBeat(ref float lastReportedBeat, float offset = 0, bool shiftBeatToOffset = true)
{
bool result = songPosition > (lastReportedBeat + offset) + secPerBeat;
if (result == true)
bool result = songPositionInBeats + (shiftBeatToOffset ? offset : 0f) >= (lastReportedBeat) + 1f;
if (result)
{
lastReportedBeat = (songPosition - (songPosition % secPerBeat));
if (!shiftBeatToOffset)
lastReportedBeat += offset;
lastReportedBeat += 1f;
}
return result;
}

View File

@ -159,6 +159,18 @@ namespace HeavenStudio
List<float> entities = Beatmap.entities.Select(c => c.beat).ToList();
List<float> tempoChanges = Beatmap.tempoChanges.Select(c => c.beat).ToList();
if (currentTempoEvent < Beatmap.tempoChanges.Count && currentTempoEvent >= 0)
{
// Debug.Log("Checking Tempo Change at " + tempoChanges[currentTempoEvent] + ", current beat " + Conductor.instance.songPositionInBeats);
if (Conductor.instance.songPositionInBeats >= tempoChanges[currentTempoEvent])
{
// Debug.Log("Tempo Change at " + Conductor.instance.songPositionInBeats + " of bpm " + Beatmap.tempoChanges[currentTempoEvent].tempo);
Conductor.instance.SetBpm(Beatmap.tempoChanges[currentTempoEvent].tempo);
Conductor.instance.timeSinceLastTempoChange = Time.time;
currentTempoEvent++;
}
}
if (currentEvent < Beatmap.entities.Count && currentEvent >= 0)
{
if (Conductor.instance.songPositionInBeats >= entities[currentEvent] /*&& SongPosLessThanClipLength(Conductor.instance.songPositionInBeats)*/)
@ -194,18 +206,6 @@ namespace HeavenStudio
// currentEvent += gameManagerEntities.Count;
}
}
if (currentTempoEvent < Beatmap.tempoChanges.Count && currentTempoEvent >= 0)
{
// Debug.Log("Checking Tempo Change at " + tempoChanges[currentTempoEvent] + ", current beat " + Conductor.instance.songPositionInBeats);
if (Conductor.instance.songPositionInBeats >= tempoChanges[currentTempoEvent])
{
// Debug.Log("Tempo Change at " + Conductor.instance.songPositionInBeats + " of bpm " + Beatmap.tempoChanges[currentTempoEvent].tempo);
Conductor.instance.SetBpm(Beatmap.tempoChanges[currentTempoEvent].tempo);
Conductor.instance.timeSinceLastTempoChange = Time.time;
currentTempoEvent++;
}
}
}
public void ToggleInputs(bool inputs)

View File

@ -270,7 +270,7 @@ namespace HeavenStudio.Games
public void StartMarching(float beat)
{
marchStartBeat = beat;
marchOffset = (marchStartBeat % 1) * Conductor.instance.secPerBeat / Conductor.instance.musicSource.pitch;
marchOffset = marchStartBeat % 1;
currentMarchBeat = 0;
stepCount = 0;

View File

@ -28,18 +28,25 @@ namespace HeavenStudio.Games.Scripts_FanClub
float clappingStartTime = Single.MinValue;
public void AddHit(float beat, int type)
public void AddHit(float beat, int type = 0)
{
if (player)
{
if (type == 0) // normal clap
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, ClapJust, ClapThrough, Out);
else if (type == 1) // jump
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_UP, JumpJust, JumpThrough, JumpOut);
else if (type == 2) //"kamone" charge
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, ChargeClapJust, ClapThrough, Out);
else //"kamone" long clap (first)
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, LongClapJust, ClapThrough, Out);
switch (type)
{
case 0:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, ClapJust, ClapThrough, Out);
break;
case 1:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_UP, JumpJust, JumpThrough, JumpOut);
break;
case 2:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, ChargeClapJust, ClapThrough, Out);
break;
default:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, LongClapJust, ClapThrough, Out);
break;
}
}
}
@ -107,12 +114,9 @@ namespace HeavenStudio.Games.Scripts_FanClub
}
if (PlayerInput.PressedUp())
{
if (stopCharge)
if (clappingStartTime != Single.MinValue && cond.songPositionInBeats > clappingStartTime + 2f && stopCharge && !FanClub.instance.IsExpectingInputNow())
{
if (!FanClub.instance.IsExpectingInputNow())
{
JumpStart(false);
}
JumpStart(false);
}
else
{

View File

@ -240,9 +240,18 @@ namespace HeavenStudio.Games.Global
}
else if (idolShown)
{
IdolAnimator.Play("IdolHide", -1, 0);
IdolAnimator.speed = (1f / cond.pitchedSecPerBeat) * 0.5f;
idolShown = false;
if (prog < 1f)
{
IdolAnimator.Play("NoPose", -1, 0);
IdolAnimator.speed = 1;
idolShown = false;
}
else
{
IdolAnimator.Play("IdolHide", -1, 0);
IdolAnimator.speed = (1f / cond.pitchedSecPerBeat) * 0.5f;
idolShown = false;
}
}
}
}

View File

@ -116,7 +116,7 @@ namespace HeavenStudio.Games
float t1 = closest.startBeat + closest.timer;
float t2 = toCompare.startBeat + toCompare.timer;
Debug.Log("t1=" + t1 + " -- t2=" + t2);
// Debug.Log("t1=" + t1 + " -- t2=" + t2);
if (t2 < t1) closest = toCompare;
}