Andy Ross wrote:
Erik Hofman wrote:
Great, then we would have literally a thousand nasal interpreted scripts
running for something as trivial as getting the time since creating,
which in C is just as easy as adding dt to an internal value  :-\

I don't follow this.  In Nasal, as in C, it's just as easy as adding
"dt" (which in this context is a property value) to an internal
variable.  But it can be aircraft/model-specific and doesn't require
modifying the fgfs binary.

Surely you aren't advocating having literally a thousand
aircraft/model-specific C++ objects linked into the default binary?

Linked, no. Generated on the fly, yes.
Every AIModel has it's own subtree inside the property tree. On of those properties (for ballistic models at least) is "sim/time/elapsed-sec". The value of this property is increased every time the AIManager is run. The only overhead would be if the property is references by an animation since the property is tied to a value.
Can't beat that with Nasal.

Erik

_______________________________________________
Flightgear-users mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-users
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to