mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Fixed error in Olympus Command
And added some minor optimization
This commit is contained in:
@@ -116,9 +116,10 @@ export class Unit extends Marker {
|
|||||||
setData(data: UpdateData) {
|
setData(data: UpdateData) {
|
||||||
document.dispatchEvent(new CustomEvent("unitUpdated", { detail: this }));
|
document.dispatchEvent(new CustomEvent("unitUpdated", { detail: this }));
|
||||||
var updateMarker = false;
|
var updateMarker = false;
|
||||||
if (this.getFlightData().latitude != data.flightData.latitude ||
|
|
||||||
this.getFlightData().longitude != data.flightData.longitude ||
|
if ((data.flightData.latitude != undefined && data.flightData.longitude != undefined && (this.getFlightData().latitude != data.flightData.latitude || this.getFlightData().longitude != data.flightData.longitude))
|
||||||
this.getBaseData().alive != data.baseData.alive || this.#forceUpdate || !getMap().hasLayer(this))
|
|| (data.baseData.alive != undefined && this.getBaseData().alive != data.baseData.alive)
|
||||||
|
|| this.#forceUpdate || !getMap().hasLayer(this))
|
||||||
updateMarker = true;
|
updateMarker = true;
|
||||||
|
|
||||||
if (data.baseData != undefined)
|
if (data.baseData != undefined)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Olympus.DLLsloaded = false
|
|||||||
Olympus.OlympusModPath = os.getenv('DCSOLYMPUS_PATH')..'\\bin\\'
|
Olympus.OlympusModPath = os.getenv('DCSOLYMPUS_PATH')..'\\bin\\'
|
||||||
|
|
||||||
function Olympus.debug(message, displayFor)
|
function Olympus.debug(message, displayFor)
|
||||||
if debug then:
|
if debug == true then
|
||||||
trigger.action.outText(message, displayFor)
|
trigger.action.outText(message, displayFor)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user