From 968fe10de70510733d697d9fb7ff78ad206b291d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 8 Oct 2020 01:49:21 +0200 Subject: [PATCH] - use unsigned variables for Duke's spinning selector. The formula depends on unsigned modulo. --- wadsrc/static/zscript/games/duke/ui/menu.zs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wadsrc/static/zscript/games/duke/ui/menu.zs b/wadsrc/static/zscript/games/duke/ui/menu.zs index e90a5d3e2..a1bc018d3 100644 --- a/wadsrc/static/zscript/games/duke/ui/menu.zs +++ b/wadsrc/static/zscript/games/duke/ui/menu.zs @@ -33,8 +33,8 @@ class DukeMenuDelegate : RazeMenuDelegate void DrawCursor(double x, double y, double scale, bool right) { - int mclock = MSTime() * 120 / 1000; - int frames = (gameinfo.gametype & GAMEFLAG_RR) ? 16 : 7; + uint mclock = MSTime() * 120 / 1000; + uint frames = (gameinfo.gametype & GAMEFLAG_RR) ? 16 : 7; String picname; if (!right) picname= String.Format("SPINNINGNUKEICON%d", ((mclock >> 3) % frames)); else picname = String.Format("SPINNINGNUKEICON%d", frames - 1 - ((frames - 1 + (mclock >> 3)) % frames));