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:
parent
01852518b7
commit
c8d809c3e7
@ -116,11 +116,12 @@ export class Unit extends Marker {
|
||||
setData(data: UpdateData) {
|
||||
document.dispatchEvent(new CustomEvent("unitUpdated", { detail: this }));
|
||||
var updateMarker = false;
|
||||
if (this.getFlightData().latitude != data.flightData.latitude ||
|
||||
this.getFlightData().longitude != data.flightData.longitude ||
|
||||
this.getBaseData().alive != data.baseData.alive || this.#forceUpdate || !getMap().hasLayer(this))
|
||||
|
||||
if ((data.flightData.latitude != undefined && data.flightData.longitude != undefined && (this.getFlightData().latitude != data.flightData.latitude || this.getFlightData().longitude != data.flightData.longitude))
|
||||
|| (data.baseData.alive != undefined && this.getBaseData().alive != data.baseData.alive)
|
||||
|| this.#forceUpdate || !getMap().hasLayer(this))
|
||||
updateMarker = true;
|
||||
|
||||
|
||||
if (data.baseData != undefined)
|
||||
{
|
||||
for (let key in this.#data.baseData)
|
||||
|
||||
@ -12,7 +12,7 @@ Olympus.DLLsloaded = false
|
||||
Olympus.OlympusModPath = os.getenv('DCSOLYMPUS_PATH')..'\\bin\\'
|
||||
|
||||
function Olympus.debug(message, displayFor)
|
||||
if debug then:
|
||||
if debug == true then
|
||||
trigger.action.outText(message, displayFor)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user