Files

521 B
Raw Permalink Blame History

Ae.js — getRayEntity() (satır 619)

← Ae.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) {}

    return null;
}