diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-02-22 02:44:11 +0300 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-02-22 02:44:11 +0300 |
commit | b5e3d2a2eaec5ac20c959538a9c161b25e2087a7 (patch) | |
tree | 81e76be8139715babb12f487ad35772844b386aa /source/gameengine/Ketsji | |
parent | 648dec3411a526eba9ac3ae2501038028ece4bc7 (diff) |
Bugfix #25803 (LibLoad'ed scene objects don't have timer property updated)
The KX_Scenes' SCA_TimeEventManagers were not being merged. These handle the timer prop
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 87cb46e65a9..721d2013e05 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1857,6 +1857,16 @@ bool KX_Scene::MergeScene(KX_Scene *other) /* when merging objects sensors are moved across into the new manager, dont need to do this here */ } + + /* grab any timer properties from the other scene */ + SCA_TimeEventManager *timemgr= GetTimeEventManager(); + SCA_TimeEventManager *timemgr_other= other->GetTimeEventManager(); + vector<CValue*> times = timemgr_other->GetTimeValues(); + + for(unsigned int i= 0; i < times.size(); i++) { + timemgr->AddTimeProperty(times[i]); + } + } return true; } |