Skip to content

Commit

Permalink
Fixing timer shenanigans in MHZ.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed May 19, 2015
1 parent 42c2138 commit c832b49
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MHZ/MHZ.cs
Expand Up @@ -31,9 +31,16 @@ public override void Init(int width, int height)
if (height < levelimg.Height)
Camera_Y_pos += (short)((levelimg.Height / 2) - (height / 2));
Camera_X_pos = 0;
curpal = 0;
fadeframe = -1;
UpdateScrolling(0, 0);
if (LevelData.Palette.Count > 1)
{
if (paltimer != null)
{
paltimer.Stop();
paltimer.Dispose();
}
paltimer = new System.Timers.Timer((levelinfo.PaletteTime ?? TimeSpan.FromMinutes(1)).TotalMilliseconds);
paltimer.Elapsed += paltimer_Elapsed;
paltimer.Start();
Expand Down

0 comments on commit c832b49

Please sign in to comment.