From bf832ebe71932fa404bbf38b3b6df855c1a02e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adonais=20Romero=20Gonz=C3=A1lez?= Date: Wed, 12 Oct 2016 21:03:41 -0500 Subject: [PATCH] uint for ids --- osu.Game/Graphics/UserInterface/StandardComboCounter.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/StandardComboCounter.cs b/osu.Game/Graphics/UserInterface/StandardComboCounter.cs index b22fda1070..36afcea79c 100644 --- a/osu.Game/Graphics/UserInterface/StandardComboCounter.cs +++ b/osu.Game/Graphics/UserInterface/StandardComboCounter.cs @@ -22,7 +22,7 @@ namespace osu.Game.Graphics.UserInterface { protected SpriteText popOutSpriteText; - protected volatile int scheduledPopOutCurrentId = 0; + protected uint scheduledPopOutCurrentId = 0; public ulong PopOutDuration = 0; public float PopOutBigScale = 2.0f; @@ -84,6 +84,7 @@ namespace osu.Game.Graphics.UserInterface removeTransforms(typeof(TransformULongCounter)); VisibleCount = newValue; } + // Also, ignore rollback if already rollbacking else if (currentValue != 0) transformCount(new TransformULongCounter(Clock), currentValue, newValue); } @@ -113,7 +114,7 @@ namespace osu.Game.Graphics.UserInterface popOutSpriteText.MoveTo(countSpriteText.Position, PopOutDuration, PopOutEasing); scheduledPopOutCurrentId++; - int newTaskId = scheduledPopOutCurrentId; + uint newTaskId = scheduledPopOutCurrentId; Scheduler.AddDelayed(delegate { scheduledPopOutSmall(newTaskId, newValue); @@ -134,7 +135,7 @@ namespace osu.Game.Graphics.UserInterface countSpriteText.ScaleTo(1, PopOutDuration, PopOutEasing); } - protected virtual void scheduledPopOutSmall(int id, ulong newValue) + protected virtual void scheduledPopOutSmall(uint id, ulong newValue) { // Too late; scheduled task invalidated if (id != scheduledPopOutCurrentId)