h1z1-server
    Preparing search index...

    Function calculate_falloff

    • Calculates the damage reduction based on distance using a linear falloff formula.

      Parameters

      • distance: number

        The distance between the target and the source.

      • minDamage: number

        The minimum damage value.

      • maxDamage: number

        The maximum damage value.

      • falloffStart: number

        The distance at which damage falloff begins.

      • falloffEnd: number

        The distance at which damage reaches its minimum value.

      Returns number

      The calculated damage after falloff.