The formula for positive values is as follows:
Code: Select all
effectiveness *= ( max + player->ping * sg_rubberCyclePing )/max;
Where ping is in seconds, max is CYCLE_RUBBER, and the effectiveness can be thought of as a factor to CYCLE_RUBBER to get the effective rubber.
That formula can be somewhat simplified:
Code: Select all
effective rubber = CYCLE_RUBBER + ping * CYCLE_PING_RUBBER
For negative rubber values, your ping*CYCLE_PING_RUBBER is added to the rubber. But that's probably not what you want.
An example: at default settings, a player with 50ms of ping gets 5 + 0.05 * 3 = 5.15 rubber, and a player with 300ms of ping gets 5 + 0.3 * 3 = 5.9 rubber.
Btw, the effective rubber can be thought of the distance a cycle would drive if it wasn't facing a wall before it explodes.