...
|
...
|
@@ -39,6 +39,7 @@ modified by zakharov
|
39
|
39
|
var shift = props.globals.getNode("/devices/status/keyboard/shift");
|
40
|
40
|
var ctrl = props.globals.getNode("/devices/status/keyboard/ctrl");
|
41
|
41
|
var alt = props.globals.getNode("/devices/status/keyboard/alt");
|
|
42
|
+ var previousMouseMode = 0;
|
42
|
43
|
|
43
|
44
|
var get_modifiers = func {
|
44
|
45
|
shift.getValue() + 2 * ctrl.getValue() + 4 * alt.getValue();
|
...
|
...
|
@@ -64,8 +65,14 @@ modified by zakharov
|
64
|
65
|
setprop("/controls/armament/trigger", v);
|
65
|
66
|
}
|
66
|
67
|
else
|
67
|
|
- button0 = func (v) { setprop("/sim/current-view/view-number", v);
|
68
|
|
- }
|
|
68
|
+ button0 = func (v) {
|
|
69
|
+ if (v) {
|
|
70
|
+ previousMouseMode = getprop("/devices/status/mice/mouse[0]/mode");
|
|
71
|
+ setprop("/devices/status/mice/mouse[0]/mode", 2);
|
|
72
|
+ }
|
|
73
|
+ else setprop("/devices/status/mice/mouse[0]/mode", previousMouseMode);
|
|
74
|
+ setprop("/sim/current-view/view-number", v);
|
|
75
|
+ }
|
69
|
76
|
]]></script>
|
70
|
77
|
</nasal>
|
71
|
78
|
|