void FGAIBallistic::bind() {
// FGAIBase::bind();
- props->tie("sim/time/elapsed-sec", SGRawValuePointer<double>(&(this->life_timer)));
+ props->tie("sim/time/elapsed-sec",
+ SGRawValueMethods<FGAIBallistic,double>(*this,
+ &FGAIBallistic::_getTime));
}
void FGAIBallistic::unbind() {
if (altitude < -1000.0) setDie(true);
}
+
+double FGAIBallistic::_getTime() const {
+ return life_timer;
+}
+
void setDragArea( double a );
void setLife( double seconds );
void setBuoyancy( double fpss );
- void setWind_from_east( double fps );
- void setWind_from_north( double fps );
- void setWind( bool val );
+ void setWind_from_east( double fps );
+ void setWind_from_north( double fps );
+ void setWind( bool val );
+
+ double _getTime() const;
private:
bool aero_stabilized; // if true, object will point where it's going
double drag_area; // equivalent drag area in ft2
double life_timer; // seconds
- double gravity; // fps2
- double buoyancy; // fps2
- double wind_from_east; // fps
- double wind_from_north; // fps
- bool wind; // if true, local wind will be applied to object
+ double gravity; // fps2
+ double buoyancy; // fps2
+ double wind_from_east; // fps
+ double wind_from_north; // fps
+ bool wind; // if true, local wind will be applied to object
void Run(double dt);
};
ai_list_itr = ai_list.begin();
while(ai_list_itr != ai_list.end()) {
if ((*ai_list_itr)->getDie()) {
- delete (*ai_list_itr);
--numObjects[(*ai_list_itr)->getType()];
--numObjects[0];
+ delete (*ai_list_itr);
if ( ai_list_itr == ai_list.begin() ) {
ai_list.erase(ai_list_itr);
ai_list_itr = ai_list.begin();