From 45139015c54e8fe0ebd6c26f216a4f3195eefcfd Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 22 Oct 2009 23:17:15 +1300 Subject: [PATCH] fixed cursor framerate --- OpenRa.Game/Graphics/Viewport.cs | 6 +++++- OpenRa.Game/World.cs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Graphics/Viewport.cs b/OpenRa.Game/Graphics/Viewport.cs index cfdab6df88..a8e6d4bb2e 100644 --- a/OpenRa.Game/Graphics/Viewport.cs +++ b/OpenRa.Game/Graphics/Viewport.cs @@ -50,13 +50,17 @@ namespace OpenRa.Game.Graphics foreach (Region region in regions) region.Draw(renderer); - cursorFrame += 0.01f; cursorRenderer.DrawSprite(cursor.GetSprite((int)cursorFrame), mousePos + Location - cursor.GetHotspot(), 0); cursorRenderer.Flush(); renderer.EndFrame(); } + public void Tick() + { + cursorFrame += 0.5f; + } + Region dragRegion = null; public void DispatchMouseInput(MouseInput mi) { diff --git a/OpenRa.Game/World.cs b/OpenRa.Game/World.cs index 9bdc4859c7..8ffdbf739d 100644 --- a/OpenRa.Game/World.cs +++ b/OpenRa.Game/World.cs @@ -41,6 +41,7 @@ namespace OpenRa.Game foreach (var e in effects) e.Tick(); Renderer.waterFrame += 0.00125f * timestep; + Game.viewport.Tick(); } foreach (Action a in frameEndActions) a(this);