public synchronized void overlay(int id, int frame, int olid, boolean prs, Indir<Resource> resid, Message sdt) {
        Gob g = getgob(id, frame);
        if (g == null)
            return;
        Gob.Overlay ol = g.findol(olid);
        if (resid != null) {
            if (ol == null) {
                g.ols.add(ol = new Gob.Overlay(olid, resid, sdt));
            } else if (!ol.sdt.equals(sdt)) {
                g.ols.remove(ol);
                g.ols.add(ol = new Gob.Overlay(olid, resid, sdt));
            }
            ol.delign = prs;
        } else {
            if ((ol != null) && (ol.spr instanceof Gob.Overlay.CDel))
                ((Gob.Overlay.CDel) ol.spr).delete();
            else
                g.ols.remove(ol);
        }
    }