mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-11-04 09:15:29 +01:00 
			
		
		
		
	Raise the player fall damage threshold to a much more fun level
This commit is contained in:
		@@ -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);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user