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