#7 Silly fix for the M and X mods issue. Will clean it up, as well as the SpeedMods...
authorCameron Ball <c.ball1729@gmail.com>
Sun, 8 Dec 2013 17:08:13 +0000 (01:08 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Sun, 8 Dec 2013 17:08:13 +0000 (01:08 +0800)
Themes/GrooveNights/Scripts/SpeedMods.lua

index 90f8043..fc40eda 100644 (file)
@@ -244,6 +244,15 @@ function SpeedMods(name)
         if ModType == 'x-mod' then SpeedMod = SpeedMod .. 'x' end      \r
           \r
                Trace("SpeedMods: About to apply " .. SpeedMod)\r
+               \r
+               --[[ This is the most retarded thing. For some reason when you apply an M-Mod or an X-Mod you can\r
+               get these weird situations where GAMESTATE:PlayerIsUsingModifier will tell you that there is an M and\r
+               an X mod in use. Therefore GetSpeedMod often returns the wrong speed mod (this seems to happen most when\r
+               you choose 0x or m0 and then try change the mod type). This is a silly fix that checks what the mod being\r
+               set is, then set the other one (IE if we're setting X, then change M) to a value outside of where GetSpeedMod\r
+               will ever look ]]--\r
+               if ModType == 'm-mod' then GAMESTATE:ApplyGameCommand('mod,99x',pn+1) end --quick fix. Need to make it go just one higher than the highest possible according to GetSpeeds\r
+               if ModType == 'x-mod' then GAMESTATE:ApplyGameCommand('mod,m9999',pn+1) end --quick fix. Need to make it go just one higher than the highest possible according to GetSpeeds\r
         GAMESTATE:ApplyGameCommand('mod,'..SpeedMod,pn+1) --this is so annoying, the player number has to be 1 or 2 for ApplyGameCommand\r
         MESSAGEMAN:Broadcast('SpeedModChanged')\r
     end\r