Why not store the last value of GetGameSpeed when it's not 0 and use it when it's 0
Code: ags
LastGameSpeed = (GetGameSpeed() == 0) ? LastGameSpeed : GetGameSpeed()
float timeStep = 10.0/IntToFloat(LastGameSpeed);