SetActivLeaf("kabinet");
Spirit_Particles()
AddObjForCur()

dver={
812,0,
1021,0,
1019,493,
911,477,
944,307,
866,300,
829,423
}
stol={
103,358,
418,313,
635,331,
619,532,
290,652,
101,607
}
tumba={
696,284,
807,293,
801,412,
668,402,
651,291
}

posilka={
661,413,
830,413,
830,530,
661,530
}

open_shkaf={
110,34,
179,34,
179,309,
110,309
}

diploms={
519,97,
645,100,
645,202,
517,200
}

flags.photo = true;


CreatePolygon(216,4,"diploms");

SetAlfa(1000,1,0.5,5);
light_blik=false;
CreatePolygon(16,6,"stol");
addactivobjecttogame(18,"BigKab",620,308,"","",0,0,238,86,143,57); --открытый ящик тумбочки 18
speciale_action(2,18);
CreatePolygon(20,5,"tumba");
CreatePolygon(99,4,"posilka");
addstaticobjecttogame(9,"BigKab",641,405,"",0,317,248,154);
if not flags.posilka then
    speciale_action(2,9)
end;
addstaticobjecttogame(21,"BigKab",158,19 ,"",381,86,26,319); --дверка2 открыта
CreatePolygon(21,4,"open_shkaf")
speciale_action(2,21);
addactivobjecttogame(22,"BigKab",107,31 ,"","",0,0,159,0,79,302); --дверка2 закрыта
addstaticobjecttogame(24,"BigKab",22 ,29 ,"",0,0,159,317); --остальные книги
CreatePolygon(28,7,"dver");
addstaticobjecttogame(29,"0029",0  ,0  ,""); --комната
set_pixel_check(28,false)
set_pixel_check(20,false)
set_pixel_check(22,false)
    if not flags.hint_cur then
        Block_Show_Cur(false)
    end;
addfade(501,1);
--WaitRender()
-----восстановление локации после удаления листа!!!
if flags.tumba then
  flags.ruchka_loc = true;
  flags.open_tumba_loc = true;
  speciale_action(2,18);
  ActivateObject(18,false);
  ActivateObject(20,false); 
end;

if flags.shkaf then
  speciale_action(2,21);
  speciale_action(10,21)
  speciale_action(2,22);
end;
    if flags.medalyon then
        speciale_action(2,99)
    end;
--end;
    if flags.to_run_com5 then
        Block_Show_Cur(true)
    end;