]> git.mxchange.org Git - flightgear.git/commit
allow AI models to contain <nasal><load> and <nasal><unload> blocks in
authormfranz <mfranz>
Sun, 1 Apr 2007 12:39:20 +0000 (12:39 +0000)
committermfranz <mfranz>
Sun, 1 Apr 2007 12:39:20 +0000 (12:39 +0000)
commit8a6c95451b5a1b9a3ac0202d8a68a94f179f3c8c
treeaa0e0c97b662cdcfc73535ac4053134a51578c9f
parent77c176424e0fb9d9ab7524ceeedbf2655f8d6736
allow AI models to contain <nasal><load> and <nasal><unload> blocks in
their XML wrapper/animation file. They can access their /ai/models node
via cmdarg() function. Example:

  <nasal>
          <load>
                  print("Hi, I'm the Nimitz. My data are under ",
                                  cmdarg().getPath());
          </load>
          <unload>
                  ...
          </unload>
  </nasal>

Note, however, that the <unload> block is only called on exit at the moment,
not when the tile is unloaded.
src/AIModel/AIBase.cxx
src/AIModel/AIManager.cxx
src/AIModel/AIManager.hxx
src/Scripting/NasalSys.cxx
src/Scripting/NasalSys.hxx