Raise the player fall damage threshold to a much more fun level

stable-0.4
Perttu Ahola 2012-03-29 23:32:56 +03:00
parent 18350ad37f
commit 9d456ca87a
1 changed files with 4 additions and 2 deletions

View File

@ -1999,12 +1999,14 @@ void ClientEnvironment::step(float dtime)
if(info.t == COLLISION_FALL) if(info.t == COLLISION_FALL)
{ {
//f32 tolerance = BS*10; // 2 without damage //f32 tolerance = BS*10; // 2 without damage
f32 tolerance = BS*12; // 3 without damage //f32 tolerance = BS*12; // 3 without damage
f32 tolerance = BS*14; // 5 without damage
f32 factor = 1; f32 factor = 1;
if(info.speed > tolerance) if(info.speed > tolerance)
{ {
f32 damage_f = (info.speed - tolerance)/BS*factor; f32 damage_f = (info.speed - tolerance)/BS*factor;
u16 damage = (u16)(damage_f+0.5); u16 damage = (u16)(damage_f+0.5);
if(damage != 0)
damageLocalPlayer(damage, true); damageLocalPlayer(damage, true);
} }
} }