function open_doors() // this function is called by each door
{
// t_door_sounds();
if (my.swing)
{
if (my.angle > 0)
{
while (my.pan < my.skill64 + my.angle) // rotate the door
{
my.pan += my.speed * time_step;
set (my, PASSABLE); // the key is passable
wait (1);
}
}
if (my.angle < 0)
{
while (my.pan > my.skill64 + my.angle) // rotate the door
{
my.pan -= my.speed * time_step;
set (my, PASSABLE); // the key is passable
wait (1);
}
}
}
}