mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Move unculled zones out of MapModel.
This commit is contained in:
@@ -385,7 +385,6 @@ new QWebChannel(qt.webChannelTransport, function (channel) {
|
||||
game.flightsChanged.connect(drawAircraft);
|
||||
game.threatZonesChanged.connect(drawThreatZones);
|
||||
game.mapZonesChanged.connect(drawMapZones);
|
||||
game.unculledZonesChanged.connect(drawUnculledZones);
|
||||
game.selectedFlightChanged.connect(updateSelectedFlight);
|
||||
});
|
||||
|
||||
@@ -402,6 +401,9 @@ function handleStreamedEvents(events) {
|
||||
for (const player of events.navmesh_updates) {
|
||||
drawNavmesh(player);
|
||||
}
|
||||
if (events.unculled_zones_updated) {
|
||||
drawUnculledZones();
|
||||
}
|
||||
}
|
||||
|
||||
function recenterMap(center) {
|
||||
@@ -1124,7 +1126,7 @@ function drawMapZones() {
|
||||
inclusionZones.clearLayers();
|
||||
exclusionZones.clearLayers();
|
||||
|
||||
getJson("/map-zones").then((zones) => {
|
||||
getJson("/map-zones/terrain").then((zones) => {
|
||||
for (const zone of zones.sea) {
|
||||
L.polygon(zone, {
|
||||
color: "#344455",
|
||||
@@ -1157,14 +1159,16 @@ function drawMapZones() {
|
||||
function drawUnculledZones() {
|
||||
unculledZones.clearLayers();
|
||||
|
||||
for (const zone of game.unculledZones) {
|
||||
L.circle(zone.position, {
|
||||
radius: zone.radius,
|
||||
color: "#b4ff8c",
|
||||
fill: false,
|
||||
interactive: false,
|
||||
}).addTo(unculledZones);
|
||||
}
|
||||
getJson("/map-zones/unculled").then((zones) => {
|
||||
for (const zone of zones) {
|
||||
L.circle(zone.position, {
|
||||
radius: zone.radius,
|
||||
color: "#b4ff8c",
|
||||
fill: false,
|
||||
interactive: false,
|
||||
}).addTo(unculledZones);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function drawIpZones(id) {
|
||||
|
||||
Reference in New Issue
Block a user