1
0
Fork 0

AI Tanker: notify any listeners that a new tanker has been added.

need to set /ai/models/model-added to the path of the tanker node when created.
This commit is contained in:
Richard Harrison 2017-09-17 07:36:11 +02:00
parent b1f197434c
commit 91dc5d2a83

View file

@ -137,6 +137,10 @@ var Tanker = {
m.model.getNode("roll-deg-prop", 1).setValue(m.rollN.getPath()); m.model.getNode("roll-deg-prop", 1).setValue(m.rollN.getPath());
m.model.getNode("load", 1).remove(); m.model.getNode("load", 1).remove();
m.identify(); m.identify();
# notify any listeners that a new model has been added.
setprop("/ai/models/model-added", m.ai.getPath());
return Tanker.active[m.callsign] = m; return Tanker.active[m.callsign] = m;
}, },
del: func { del: func {