Files

509 B
Raw Permalink Blame History

Darklord.js — getRayEntity() (satır 3494)

← Darklord.js · ← Master

function getRayEntity(player, range)
{
    var ray = null;

    try { ray = player.rayTrace(range); } catch (e1) {}
    if (!ray) return null;

    try { if (ray.isEntity && ray.isEntity()) return ray.getEntity(); } catch (e2) {}
    try { if (ray.entity) return ray.entity; } catch (e3) {}
    try { return ray.getEntity(); } catch (e4) {}

    return null;
}