Auto-Update shared Files

damage 1.4.5->1.4.7 (BUK-M2/Nasal/damage.nas)
damage 1.4.5->1.4.7 (depot/Nasal/damage.nas)
damage 1.4.5->1.4.7 (fleet/Nasal/damage.nas)
damage 1.4.5->1.4.7 (Frigate/Nasal/damage.nas)
damage 1.4.5->1.4.7 (gci-radar/Nasal/damage.nas)
damage 1.4.5->1.4.7 (groundtarget/Nasal/damage.nas)
damage 1.4.5->1.4.7 (MIM-104D/Nasal/damage.nas)
damage 1.4.5->1.4.7 (missile-frigate/Nasal/damage.nas)
damage 1.4.5->1.4.7 (S-200/Nasal/damage.nas)
damage 1.4.5->1.4.7 (S-300/Nasal/damage.nas)
damage 1.4.5->1.4.7 (S-75/Nasal/damage.nas)
damage 1.4.5->1.4.7 (SA-3/Nasal/damage.nas)
damage 1.4.5->1.4.7 (SA-6/Nasal/damage.nas)
damage 1.4.5->1.4.7 (ZSU-23/Nasal/damage.nas)
This commit is contained in:
github-actions[bot] 2024-04-25 00:50:28 +00:00
parent cca48953f8
commit c7665080c4
15 changed files with 490 additions and 322 deletions

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -293,7 +293,7 @@ var DamageRecipient =
# " RemoteCallsign=",notification.RemoteCallsign, # " RemoteCallsign=",notification.RemoteCallsign,
# " Flags=",notification.Flags, # " Flags=",notification.Flags,
# " Radar=",bits.test(notification.Flags, 0), # " Radar=",bits.test(notification.Flags, 0),
# " Thrust=",bits.test(notification.Flags, 1)); # " Thrust=",bits.test(notification.Flags, 1),
# " CWI=",bits.test(notification.Flags, 2)); # " CWI=",bits.test(notification.Flags, 2));
# #
# todo: # todo:
@ -449,28 +449,40 @@ var DamageRecipient =
damageLog.push("Ignored hit by "~notification.Callsign); damageLog.push("Ignored hit by "~notification.Callsign);
return emesary.Transmitter.ReceiptStatus_NotProcessed; return emesary.Transmitter.ReceiptStatus_NotProcessed;
} }
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto)) {
var node = getCallsign(notification.RemoteCallsign);
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
var callsign = processCallsign(getprop("sim/multiplay/callsign")); var callsign = processCallsign(getprop("sim/multiplay/callsign"));
if (tacview_supported and tacview.starttime and (getprop("sim/multiplay/txhost") != "mpserver.opredflag.com" or m28_auto or notification.RemoteCallsign == callsign)) {
var node = getCallsign(notification.RemoteCallsign);
if (notification.RemoteCallsign == callsign) node = 1;
if (node != nil and (notification.SecondaryKind > 20 or notification.SecondaryKind < -40)) {
# its a warhead
var wh = id2warhead[DamageRecipient.emesaryID2typeID(notification.SecondaryKind)];
var lbs = wh[1];
var hitCoord = geo.Coord.new();
if (notification.RemoteCallsign == callsign) {
hitCoord = geo.aircraft_position();
} else {
hitCoord.set_latlon(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M+notification.RelativeAltitude);
}
if (notification.Distance > math.abs(notification.RelativeAltitude)) {#just a sanity check
hitCoord = hitCoord.apply_course_distance(notification.Bearing, math.sqrt(notification.Distance*notification.Distance-notification.RelativeAltitude*notification.RelativeAltitude));
}
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(),hitCoord.lon(),hitCoord.alt(), lbs*0.5);
thread.unlock(tacview.mutexWrite);
} elsif (node == 1 and notification.SecondaryKind < 0) {
# its a cannon or rocket
var hitCoord = geo.aircraft_position();
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(hitCoord.lat(), hitCoord.lon(), hitCoord.alt(), 5);
thread.unlock(tacview.mutexWrite);
} elsif (node != nil and notification.SecondaryKind < 0) {
# its a cannon or rocket
thread.lock(tacview.mutexWrite);
tacview.writeExplosion(node.getNode("position/latitude-deg").getValue(), node.getNode("position/longitude-deg").getValue(), node.getNode("position/altitude-ft").getValue()*FT2M, 5);
thread.unlock(tacview.mutexWrite);
}
}
if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) { if (notification.RemoteCallsign == callsign and getprop("payload/armament/msg") == 1) {
#damage enabled and were getting hit #damage enabled and were getting hit

View File

@ -81,59 +81,59 @@
], ],
"damage": [ "damage": [
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "BUK-M2/Nasal/damage.nas" "path": "BUK-M2/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "depot/Nasal/damage.nas" "path": "depot/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "fleet/Nasal/damage.nas" "path": "fleet/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "Frigate/Nasal/damage.nas" "path": "Frigate/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "gci-radar/Nasal/damage.nas" "path": "gci-radar/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "groundtarget/Nasal/damage.nas" "path": "groundtarget/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "MIM-104D/Nasal/damage.nas" "path": "MIM-104D/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "missile-frigate/Nasal/damage.nas" "path": "missile-frigate/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "S-200/Nasal/damage.nas" "path": "S-200/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "S-300/Nasal/damage.nas" "path": "S-300/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "S-75/Nasal/damage.nas" "path": "S-75/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "SA-3/Nasal/damage.nas" "path": "SA-3/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "SA-6/Nasal/damage.nas" "path": "SA-6/Nasal/damage.nas"
}, },
{ {
"version": "1.4.5", "version": "1.4.7",
"path": "ZSU-23/Nasal/damage.nas" "path": "ZSU-23/Nasal/damage.nas"
} }
], ],