/////////////////////////////////////////////////////////////////////////// // Copyright (C) Wizardry and Steamworks 2011 - License: GNU GPLv3 // // Please see: http://www.gnu.org/licenses/gpl.html for legal details, // // rights of fair usage, the disclaimer and warranty conditions. // /////////////////////////////////////////////////////////////////////////// // REQUIRES: float, cap // a number representing the value of a certain cap // REQUIRES: float, pad // some initial padding value you may want to pad with // PROVIDES: the random delay pool required to wait // between repeating a capped operation. float minCapDodgeTimeF(float cap, float pad) { if(cap < 0.1) return pad; pad += cap / 2.0; cap /= 10.0; return minCapDodgeTimeF(cap, pad); }