Files

843 B
Raw Permalink Blame History

MercanElArosWorldFade.js — scheduleLoop() (satır 463)

← MercanElArosWorldFade.js · ← Master

function scheduleLoop(c, runId)
{
    c.scheduleScript(LOOP_INTERVAL, function (context)
    {
        var state = mappet.get(STATE_KEY);

        if (state == null || !state.enabled || Number(state.runId) !== Number(runId))
        {
            return;
        }

        try
        {
            updateZone(context);
        }
        catch (e)
        {
            var subject = context.getSubject();

            if (subject != null && subject.isPlayer())
            {
                subject.send("Grey zone hata: " + e);
            }

            stop(context);
            return;
        }

        scheduleLoop(context, runId);
    });
}