bool ContentManager::GetStartPosition (const char* regionName, const char* startName, iString* §orName, iCelParameterBlock* ¶meters) { csRef<iCelRegion> celregion = pczonemgr->FindRegion (regionName); // Load the region. pczonemgr->ActivateRegion (celregion); // Get the start position data. csRef<iRegion> region = engine->CreateRegion (celregion->GetCsRegionName ()); if (!region.IsValid ()) { csReport (object_reg, CS_REPORTER_SEVERITY_ERROR, "precursors.addon.contentmanager", "Couldn't find region '%s'!", regionName); return false; } // end if printf ("Looking for camera position '%s'.\n", startName); fflush (stdout); csRef<iCameraPositionList> camposes = engine->GetCameraPositions (); for (int i = 0; i < camposes->GetCount (); i++) { printf ("Found camera position '%s'.\n", camposes->Get (i)->QueryObject ()->GetName ()); fflush (stdout); } //csRef<iCameraPosition> campos = region->FindCameraPosition (startName); csRef<iCameraPosition> campos = engine->FindCameraPosition (startName, 0); if (!campos.IsValid ()) { csReport (object_reg, CS_REPORTER_SEVERITY_ERROR, "precursors.addon.contentmanager", "Couldn't find start position '%s' in region '%s'!", startName, regionName); return false; } // end if sectorName = new scfString (campos->GetSector ()); parameters = ParameterBlockHelper::ParseCampos (campos, pl); return true; } // end GetStartPosition ()/*And the output of the above function:Looking for camera position 'flightstart1'.Found camera position 'flightstart1'.Found camera position 'flightstart2'.Found camera position 'flightstart3'.precursors.addon.contentmanager: Couldn't find start position 'flightstart1' in region 'space2'!*/