Skip to content

OnPlayerLand

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnPlayerLand( BasePlayer instance, float num )
{
    Puts( "OnPlayerLand works!" );
    return null;
}

Location

  • BasePlayer::ApplyFallDamageFromVelocity(float velocity)
csharp
//---
	if (IsGod())
	{
		return;
	}
	float num = Mathf.InverseLerp(-15f, -100f, velocity);
	if (num != 0f && Interface.CallHook("OnPlayerLand", this, num) == null)
	{
		float num2 = ((modifiers != null) ? Mathf.Clamp01(1f - modifiers.GetValue(Modifier.ModifierType.Clotting)) : 1f);
		metabolism.bleeding.Add(num * 0.5f * num2);
		float num3 = num * 500f;
		Facepunch.Rust.Analytics.Azure.OnFallDamage(this, velocity, num3);
//---

Released under the MIT License.