1
0
Fork 0

add interface function for selecting weapons

This commit is contained in:
mfranz 2006-06-24 12:31:58 +00:00
parent 631a06b924
commit f491fd5291

View file

@ -356,4 +356,10 @@ applyParkingBrake = func(v) {
# Weapon handling.
#
trigger = func(b) { setprop("/controls/armament/trigger", b); }
weaponSelect = func(d) {
var ws = props.globals.getNode("/controls/armament/selected", 1);
var n = ws.getValue();
if (n == nil) { n = 0; }
ws.setIntValue(n + d);
}