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 c3a227cf0f
commit 37eb45ec6d
12 changed files with 2418 additions and 1425 deletions

View file

@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 957177531333f744abeb6082b4c44bc0, type: 3}
m_Name: PostProcessOutline
m_EditorClassIdentifier:
active: 1
active: 0
enabled:
overrideState: 1
value: 1

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -768,7 +768,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4052947733920485538}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
m_Name:
@ -847,7 +847,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4052947733920485538}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2a7b4608cc97a8940ad8a9229d742532, type: 3}
m_Name:
@ -1799,6 +1799,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
EligibleHits: []
scheduledInputs: []
firstEnable: 0
renderQuadTrans: {fileID: 743597382397742394}
camPivot: {fileID: 7562518461416892310}

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
switch (type)
{
case 0:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, ClapJust, ClapThrough, Out);
else if (type == 1) // jump
break;
case 1:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_UP, JumpJust, JumpThrough, JumpOut);
else if (type == 2) //"kamone" charge
break;
case 2:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, ChargeClapJust, ClapThrough, Out);
else //"kamone" long clap (first)
break;
default:
FanClub.instance.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, LongClapJust, ClapThrough, Out);
break;
}
}
}
@ -107,13 +114,10 @@ namespace HeavenStudio.Games.Scripts_FanClub
}
if (PlayerInput.PressedUp())
{
if (stopCharge)
{
if (!FanClub.instance.IsExpectingInputNow())
if (clappingStartTime != Single.MinValue && cond.songPositionInBeats > clappingStartTime + 2f && stopCharge && !FanClub.instance.IsExpectingInputNow())
{
JumpStart(false);
}
}
else
{
animator.Play("FanFree", -1, 0);

View file

@ -239,6 +239,14 @@ namespace HeavenStudio.Games.Global
return;
}
else if (idolShown)
{
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;
@ -246,6 +254,7 @@ namespace HeavenStudio.Games.Global
}
}
}
}
private void UpdateClosedCaptionsDisplay()
{

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;
}