All pastes #259809 Raw Edit

Stuff

public cpp v1 · immutable
#259809 ·published 2006-11-27 19:46 UTC
rendered paste body
	bool ContentManager::GetStartPosition (const char* regionName, const char* startName, iString* &sectorName, iCelParameterBlock* &parameters)	{		// Load the region.		pczonemgr->ActivateRegion (pczonemgr->FindRegion (regionName));		// Get the start position data.		csString csRegionName = csString (level->GetName ()) + "_" + regionName;		printf ("Trying CS region '%s'.\n", csRegionName.GetData ());		fflush (stdout);		csRef<iRegion> region = engine->CreateRegion (csRegionName);		if (!region.IsValid ())		{			csReport (object_reg, CS_REPORTER_SEVERITY_ERROR, "precursors.addon.contentmanager", "Couldn't find region '%s'!", regionName);			return false;		} // end if		csRef<iCameraPosition> campos = region->FindCameraPosition (startName);		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 ()