Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_SceneActuator.cpp
| Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | bool KX_SceneActuator::Update() | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* returns a camera if the name is valid */ | /* returns a camera if the name is valid */ | ||||
| KX_Camera* KX_SceneActuator::FindCamera(const char *camName) | KX_Camera* KX_SceneActuator::FindCamera(const char *camName) | ||||
| { | { | ||||
| KX_SceneList* sl = m_KetsjiEngine->CurrentScenes(); | CListValue* senes = m_KetsjiEngine->CurrentScenes(); | ||||
| STR_String name = STR_String(camName); | STR_String name = STR_String(camName); | ||||
| KX_SceneList::iterator it = sl->begin(); | |||||
| KX_Camera* cam = NULL; | KX_Camera* cam = NULL; | ||||
| while ((it != sl->end()) && (!cam)) | for (unsigned int sce_idx = 0; sce_idx < senes->GetCount(); ++sce_idx) | ||||
| { | { | ||||
| cam = (*it)->FindCamera(name); | KX_Scene* scene = (KX_Scene*)senes->GetValue(sce_idx); | ||||
| it++; | cam = scene->FindCamera(name); | ||||
| if (cam) | |||||
| break; | |||||
| } | } | ||||
| return cam; | return cam; | ||||
| } | } | ||||
| KX_Scene* KX_SceneActuator::FindScene(const char *sceneName) | KX_Scene* KX_SceneActuator::FindScene(const char *sceneName) | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||