Vivian MEAZZA: call AI models' ::reinit() methods on reinit
This commit is contained in:
parent
1d880a944f
commit
ce4360e157
2 changed files with 7 additions and 0 deletions
|
@ -55,6 +55,7 @@ public:
|
||||||
virtual void update(double dt);
|
virtual void update(double dt);
|
||||||
virtual void bind();
|
virtual void bind();
|
||||||
virtual void unbind();
|
virtual void unbind();
|
||||||
|
virtual void reinit() {}
|
||||||
|
|
||||||
void setManager(FGAIManager* mgr, SGPropertyNode* p);
|
void setManager(FGAIManager* mgr, SGPropertyNode* p);
|
||||||
void setPath( const char* model );
|
void setPath( const char* model );
|
||||||
|
|
|
@ -83,6 +83,12 @@ void FGAIManager::init() {
|
||||||
|
|
||||||
void FGAIManager::reinit() {
|
void FGAIManager::reinit() {
|
||||||
update(0.0);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue