(19 Sep 10, 03:30PM)Viper Wrote:Mael Wrote:Does the grenade splash decay linearly, or is it a quadratic or cubic formula?
Can someone please answer Mael's question? I am very interested in the answer.
[SELECT ALL] Code:
#define EXPDAMRAD 10
...
void radialeffect(playerent *o, vec &v, int qdam, playerent *at, int gun)
{
...
if(dist<EXPDAMRAD)
{
int damage = (int)(qdam*(1-dist/EXPDAMRAD));
hit(damage, o, at, dir, gun, true, int(dist*DMF));
}
...
maximum grenade damage × (1 - distance ÷ maximum grenade range)
or
200 × (1 - distance ÷ 10).