Вот часть скрипта:
SCRIPT T_Head_Yx_RY_I
extern float block_state ();
extern float route_set ();
extern float next_sig_lr ();
extern float next_sig_mr ();
extern float def_draw_state ();
extern float state;
extern float draw_state;
extern float enabled;
extern float sig_feature ();
float next_state;
if (route_set())
{
state = SIGASP_STOP_AND_PROCEED;
if (enabled && (block_state() ==# BLOCK_CLEAR))
{
next_state = next_sig_lr (SIGFN_NORMAL);
if ((next_state ==# SIGASP_STOP) || ((next_sig_mr (SIGFN_NORMAL) ==# SIGASP_STOP_AND_PROCEED) && (next_state ==# SIGASP_RESTRICTING)))
{
state = SIGASP_RESTRICTING;
}
else
{
state = SIGASP_APPROACH_2;
}
}
draw_state = def_draw_state (state);
if ((state >=# SIGASP_APPROACH_1) && (next_state ># SIGASP_RESTRICTING))
{
draw_state = 3;
}
}
else
{
state = SIGASP_STOP;
if (block_state() ==# BLOCK_JN_OBSTRUCTED)
{
state = SIGASP_STOP_AND_PROCEED;
}
draw_state = def_draw_state (state);
}
|