1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
onstartup="set(gyro_fail,0);set(gyro_pass,0);sanitycheck_gyro();"
<action name="sanitycheck_gyro">
if (plugin[gyro].enabled == true,
ifnot (gyro_passed == true,
if (view.camroll GT 80,
add(gyro_fail,1);
,
if (view.camroll LT -80,
add(gyro_fail,1);
,
add(gyro_pass,1);
);
);
if (gyro_pass GT 6, set(gyro_passed, true));
if (gyro_fail GT 3,
set(plugin[gyro].enabled,false);
set(autorotate.enabled,false);
tween(view.camroll, 0);
lookto(get(view.hlookat),0,100,smooth(100,50,720));
);
delayedcall(0.2, sanitycheck_gyro());
);
);
</action>
|