Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
fixed story mode reset on random 1 frame detections
Browse files Browse the repository at this point in the history
  • Loading branch information
MgAl2O4 committed Mar 8, 2021
1 parent ea2222a commit 2de7e2e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion SINoCOLO/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public partial class MainForm : Form
private bool selectInstanceMode = false;
private int numHighFreqTicks = 0;
private int numScanDelayTicks = 0;
private int numTicksToResetStoryMode = -1;
private string cachedTitle;

[DllImport("user32.dll", CharSet = CharSet.Auto)]
Expand Down Expand Up @@ -107,9 +108,10 @@ private void GameLogic_OnStateChangeNotify(GameLogic.EState newState)
{
// always force story mode: ignore when activating colo combat
// shouldn't matter but meh, doesn't hurt to be on safe side
numTicksToResetStoryMode = -1;
if (newState == GameLogic.EState.ColoCombat)
{
comboBoxStoryMode.SelectedIndex = (int)GameLogic.EStoryMode.None;
numTicksToResetStoryMode = 20;
}

UpdateVisibileControls();
Expand Down Expand Up @@ -168,6 +170,16 @@ private void timerScan_Tick(object sender, EventArgs e)
Scan();
UpdateTimerFreq();
DetailLog();

if (numTicksToResetStoryMode > 0)
{
numTicksToResetStoryMode--;
if (numTicksToResetStoryMode == 0)
{
comboBoxStoryMode.SelectedIndex = (int)GameLogic.EStoryMode.None;
numTicksToResetStoryMode = -1;
}
}
}

private void SetScreenState(ScreenReader.EState NewState)
Expand Down
4 changes: 2 additions & 2 deletions SINoCOLO/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("25.0.0.0")]
[assembly: AssemblyFileVersion("25.0.0.0")]
[assembly: AssemblyVersion("26.0.0.0")]
[assembly: AssemblyFileVersion("26.0.0.0")]

0 comments on commit 2de7e2e

Please sign in to comment.