diff --git a/groundtarget/Models/M1/m1.xml b/groundtarget/Models/M1/m1.xml
new file mode 100644
index 0000000..972196a
--- /dev/null
+++ b/groundtarget/Models/M1/m1.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ m1a.ac
+
+
+ 0
+ 0
+ 1
+
+
+
diff --git a/groundtarget/Models/truck.xml b/groundtarget/Models/truck.xml
index 270e2e7..8bdf3d4 100644
--- a/groundtarget/Models/truck.xml
+++ b/groundtarget/Models/truck.xml
@@ -2,7 +2,37 @@
- hummer.ac
+
+
+
+ hummer.ac
+ humvee
+
+
+ select
+ humvee
+
+
+ sim/multiplay/generic/int[17]
+ 0
+
+
+
+
+
+ M1/m1.xml
+ tank
+
+
+ select
+ tank
+
+
+ sim/multiplay/generic/int[17]
+ 1
+
+
+
Aircraft/BUK-M2/Models/smoke.xml
diff --git a/groundtarget/Nasal/fdm.nas b/groundtarget/Nasal/fdm.nas
index 4135a2e..466395f 100644
--- a/groundtarget/Nasal/fdm.nas
+++ b/groundtarget/Nasal/fdm.nas
@@ -28,6 +28,9 @@ var heading_ps = 0.5;
time_last = 0;
sim_speed = 1;
+var speed = 25;
+var last_type = 0;
+
setprop("/carrier/pitch-deg",0);
setprop("/carrier/pitch-offset",0);
setprop("/carrier/roll-deg",0);
@@ -60,7 +63,7 @@ var PositionUpdater = func () {
if ( getprop("/carrier/sunk") == 0 and getprop("/autopilot/route-manager/active") == 1 ) {
#for event
- var speed = 25;
+
var cur_waypoint = getprop("/autopilot/route-manager/current-wp");
var cur_wp_lon = getprop("/autopilot/route-manager/route/wp[" ~ cur_waypoint ~ "]/longitude-deg");
var cur_wp_lat = getprop("/autopilot/route-manager/route/wp[" ~ cur_waypoint ~ "]/latitude-deg");
@@ -94,6 +97,19 @@ var PositionUpdater = func () {
#set roll
setprop("/orientation/roll-deg",getprop("/carrier/roll-deg") + getprop("/carrier/roll-offset"));
+
+
+ var type = getprop("sim/multiplay/generic/int[17]");
+ if (type != last_type) {
+ if (damage.hp_max == damage.hp) {
+ if (type == 0) {damage.hp_max=5;damage.hp=5;speed=25;}
+ if (type == 1) {damage.hp_max=100;damage.hp=100;speed=15;}
+ last_type = type;
+ } else {
+ print("Can only switch type when not damaged!!");
+ setprop("sim/multiplay/generic/int[17]", last_type);
+ }
+ }
};
diff --git a/groundtarget/gui/dialogs/type.xml b/groundtarget/gui/dialogs/type.xml
new file mode 100644
index 0000000..8884689
--- /dev/null
+++ b/groundtarget/gui/dialogs/type.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+ type
+ vbox
+ 250
+ false
+
+
+ hbox
+
+ true
+
+
+
+ true
+
+
+
+
+
+
+
+ hbox
+
+ vbox
+ 6
+
+ true
+
+
+
+
+
+
+
+
+ vbox
+ 6
+
+ true
+
+
+
+
+
+
+
diff --git a/groundtarget/truck-set.xml b/groundtarget/truck-set.xml
index c0aa992..51f608e 100644
--- a/groundtarget/truck-set.xml
+++ b/groundtarget/truck-set.xml
@@ -106,11 +106,12 @@
-
+
0
+ 0
@@ -132,6 +133,13 @@