More optimisations for #20
authorCameron Ball <c.ball1729@gmail.com>
Thu, 12 Dec 2013 17:07:37 +0000 (01:07 +0800)
committerCameron Ball <c.ball1729@gmail.com>
Thu, 12 Dec 2013 17:07:37 +0000 (01:07 +0800)
Themes/GrooveNights/Scripts/SpeedMods.lua

index d2bfe1c..5b53d25 100644 (file)
@@ -143,12 +143,13 @@ end
 function GetSpeedMod(pn)\r
        local BaseSpeeds = GetBaseSpeeds()\r
        local ExtraSpeeds = GetExtraSpeeds()\r
+       local SpeedModRowType = GetSpeedModRowType()\r
        for n = 1, table.getn(BaseSpeeds) do\r
-               if GetSpeedModRowType() == "basic" or GetSpeedModRowType() == "advanced" then\r
+               if SpeedModRowType == "basic" or SpeedModRowType == "advanced" then\r
                        if GAMESTATE:PlayerIsUsingModifier(pn, BaseSpeeds[n]) then return BaseSpeeds[n] end\r
                end\r
 \r
-               if GetSpeedModRowType() == "pro" then\r
+               if SpeedModRowType == "pro" then\r
                        for m = 1, table.getn(ExtraSpeeds) do\r
                                local CombinedSpeeds = BaseSpeeds[n] + string.gsub(ExtraSpeeds[m], 'x', '') --combines the speeds in to things like 4.50\r
 \r