// tarcza ostrzegawcza swietlna odchylona: (p6) symbol tarczy (np. ToA)

origin (p2) (p3) (p4)
rotate 0 (p5) 0
// model tarczy ostrzegawczej:
node 1000 0 (p1) model -0.45 0.17 0 0 PKP/head2-gy.t3d (p6) Lights 0 1 endmodel
node 1000 0 none model 0 0 0 0 PKP/post-Y-h2.t3d PKP/pkplight_warnpost.tga endmodel

node 800 50 none lines 80 80 80 100.0
0.0 0.0 0.0 0.0 4 0.0
endline

// W1 awers

node 1000 0 none triangle_strip material ambient: 150.0 150.0 150.0 diffuse: 220.0 220.0 220.0 specular: 154.0 154.0 154.0 endmaterial pkp/wskazniki2.bmp
0.4 1.6 0.1 0.0 0.0 -1.0 0.00269513 0.756031 end
0.4 0.1 0.1 0.0 0.0 -1.0 0.00269479 0.3411 end
-0.4 1.6 0.1 0.0 0.0 -1.0 0.180528 0.75603 end
-0.4 0.1 0.1 0.0 0.0 -1.0 0.182 0.3411
endtri

// W1 rewers

node 1000 0 none triangle_strip material ambient: 150.0 150.0 150.0 diffuse: 220.0 220.0 220.0 specular: 154.0 154.0 154.0 endmaterial pkp/wskazniki2.bmp
-0.4 1.6 0.2 0 0 1.0 0.739943 0.748875 end
-0.4 0.1 0.2 0 0 1.0 0.736632 0.34058 end
0.4 1.6 0.2 0 0 1.0 0.99848 0.749202 end
0.4 0.1 0.2 0 0 1.0 0.996336 0.341726
endtri

rotate 0 0 0
endorigin

//sygnalizacja SHP:
event (p1)_SHP putvalues 1.0 none (p2) (p3) (p4) CabSignal -1 -1 endevent

// ZDARZENA ZASADNICZE
event (p1)_os1 multiple 0.0 none (p1)_ligh1 (p1)_sem_distinfo_slow endevent
event (p1)_os2 multiple 0.0 none (p1)_ligh2 (p1)_sem_distinfo_fast endevent
event (p1)_os3 multiple 0.0 none (p1)_ligh3 (p1)_sem_distinfo_v100 endevent
event (p1)_os4 multiple 0.0 none (p1)_ligh4 (p1)_sem_distinfo_v40 endevent

event (p1)_sem_distinfo getvalues 1.0 (p1)_sem_distmem endevent

node -1 0 (p1)_sem_distmem memcell (p2) (p3) (p4) SetProximityVelocity 500.0 0.0 none endmemcell

//zdarzenia okreslajace przyblizona predkosc przy nastepnym semaforze
event (p1)_sem_distinfo_slow updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 0 endevent
event (p1)_sem_distinfo_fast updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 -1 endevent
event (p1)_sem_distinfo_v100 updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 100 endevent
event (p1)_sem_distinfo_v40 updatevalues 0.0 (p1)_sem_distmem SetProximityVelocity 500 40 endevent

// przelaczanie swiatel
event (p1)_ligh1 lights 0.0 (p1) 0 1 endevent
event (p1)_ligh2 lights 0.0 (p1) 1 0 endevent
event (p1)_ligh3 lights 0.0 (p1) 2 0 endevent
event (p1)_ligh4 lights 0.0 (p1) 0 2 endevent

