diff --git a/src/AIModel/AIBase.hxx b/src/AIModel/AIBase.hxx index 1af25d080..7dc3d4899 100644 --- a/src/AIModel/AIBase.hxx +++ b/src/AIModel/AIBase.hxx @@ -55,6 +55,7 @@ public: virtual void update(double dt); virtual void bind(); virtual void unbind(); + virtual void reinit() {} void setManager(FGAIManager* mgr, SGPropertyNode* p); void setPath( const char* model ); diff --git a/src/AIModel/AIManager.cxx b/src/AIModel/AIManager.cxx index 72f592a1e..027d59b50 100644 --- a/src/AIModel/AIManager.cxx +++ b/src/AIModel/AIManager.cxx @@ -83,6 +83,12 @@ void FGAIManager::init() { void FGAIManager::reinit() { update(0.0); + ai_list_iterator ai_list_itr = ai_list.begin(); + + while(ai_list_itr != ai_list.end()) { + (*ai_list_itr)->reinit(); + ++ai_list_itr; + } }