Raise the player fall damage threshold to a much more fun level
authorPerttu Ahola <celeron55@gmail.com>
Thu, 29 Mar 2012 20:32:56 +0000 (23:32 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Thu, 29 Mar 2012 20:32:56 +0000 (23:32 +0300)
src/environment.cpp

index 5e8f5edbaa81691fb89ce5b6cc1ecb7efb4765dd..0c6d829f5b44b557676fec9ed66d1f6f0b2201f6 100644 (file)
@@ -1999,13 +1999,15 @@ void ClientEnvironment::step(float dtime)
                if(info.t == COLLISION_FALL)
                {
                        //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;
                        if(info.speed > tolerance)
                        {
                                f32 damage_f = (info.speed - tolerance)/BS*factor;
                                u16 damage = (u16)(damage_f+0.5);
-                               damageLocalPlayer(damage, true);
+                               if(damage != 0)
+                                       damageLocalPlayer(damage, true);
                        }
                }
        }