From c9f995db5c087cc2e58b11d645742c119279ae1c Mon Sep 17 00:00:00 2001 From: fly Date: Thu, 6 May 2021 20:34:24 +0000 Subject: [PATCH] Apply texture to mp aircraft Signed-off-by: fly --- Nasal/aircraft.nas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Nasal/aircraft.nas b/Nasal/aircraft.nas index 59c31e4e3..e7a7ef36c 100644 --- a/Nasal/aircraft.nas +++ b/Nasal/aircraft.nas @@ -701,13 +701,14 @@ var canvas_livery = { # Class for Canvas based liveries # var canvas_livery_update = { - init: func(liveriesdir, interval = 10.01, callback = nil, resolution=4096) { + init: func(liveriesdir, module_id, interval = 10.01, callback = nil, resolution=4096) { var m = { parents: [canvas_livery_update, overlay_update.new()] }; m.parents[1].add(liveriesdir, "sim/model/livery/file", callback); m.parents[1].interval = interval; m.liveriesdir = liveriesdir; m.resolution = resolution; m.targets = {}; + m.module_id = module_id; return m; }, setResolution: func(resolution) { @@ -739,7 +740,7 @@ var canvas_livery_update = { # "anisotropy": 32.0 }); foreach (var object; objects) { - me.targets[name].canvas.addPlacement({"node": object}); + me.targets[name].canvas.addPlacement({"module-id": me.module_id, "type": "scenery-object", "node": object}); } me.targets[name].groups["base"] = me.targets[name].canvas.createGroup("base"); resStr = findTexByRes(me.liveriesdir, getprop(property), resolution);