mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
fix: Unit targets not being shown
This commit is contained in:
parent
b20134f8f1
commit
8e55051410
@ -402,7 +402,7 @@ export const MAP_OPTIONS_DEFAULTS: MapOptions = {
|
||||
hideUnitsShortRangeRings: true,
|
||||
showUnitContacts: true,
|
||||
showUnitPaths: true,
|
||||
showUnitTargets: false,
|
||||
showUnitTargets: true,
|
||||
showUnitLabels: true,
|
||||
showUnitsEngagementRings: true,
|
||||
showUnitsAcquisitionRings: true,
|
||||
|
||||
@ -155,6 +155,17 @@ export function OptionsMenu(props: { open: boolean; onClose: () => void; childre
|
||||
<OlCheckbox checked={mapOptions.showUnitTargets} onChange={() => {}}></OlCheckbox>
|
||||
<span className="my-auto">Show detection lines</span>
|
||||
</div>
|
||||
<div
|
||||
className={`
|
||||
group flex cursor-pointer flex-row content-center justify-start
|
||||
gap-4 rounded-md p-2
|
||||
dark:hover:bg-olympus-400
|
||||
`}
|
||||
onClick={() => getApp().getMap().setOption("showUnitTargets", !mapOptions.showUnitTargets)}
|
||||
>
|
||||
<OlCheckbox checked={mapOptions.showUnitTargets} onChange={() => {}}></OlCheckbox>
|
||||
<span className="my-auto">Show unit targets</span>
|
||||
</div>
|
||||
<div
|
||||
className={`
|
||||
group flex cursor-pointer flex-row content-center justify-start
|
||||
|
||||
@ -2355,7 +2355,7 @@ export abstract class Unit extends CustomMarker {
|
||||
}
|
||||
|
||||
#drawTarget() {
|
||||
if (this.#targetPosition.lat != 0 && this.#targetPosition.lng != 0 && getApp().getMap().getOptions().showUnitPaths) {
|
||||
if (this.#targetPosition.lat != 0 && this.#targetPosition.lng != 0 && getApp().getMap().getOptions().showUnitTargets) {
|
||||
this.#drawTargetPosition(this.#targetPosition);
|
||||
} else if (this.#targetID != 0 && getApp().getMap().getOptions().showUnitTargets) {
|
||||
const target = getApp().getUnitsManager().getUnitByID(this.#targetID);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user