mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 08:15:34 +00:00
removed sDefaultWorldspace, only sDefaultWorldspaceId now.
sDefaultWorldspaceId is a StringRefId to be able to getvalue easily.
This commit is contained in:
parent
141878f30d
commit
56cb2a83ec
7 changed files with 10 additions and 11 deletions
|
@ -264,8 +264,7 @@ namespace NavMeshTool
|
|||
const osg::Vec2i cellPosition(cell.mData.mX, cell.mData.mY);
|
||||
const std::size_t cellObjectsBegin = data.mObjects.size();
|
||||
const auto cellWorldspace = Misc::StringUtils::lowerCase(
|
||||
(cell.isExterior() ? ESM::RefId::stringRefId(ESM::Cell::sDefaultWorldspace) : cell.mId)
|
||||
.serializeText());
|
||||
(cell.isExterior() ? ESM::Cell::sDefaultWorldspaceId : cell.mId).serializeText());
|
||||
WorldspaceNavMeshInput& navMeshInput = [&]() -> WorldspaceNavMeshInput& {
|
||||
auto it = navMeshInputs.find(cellWorldspace);
|
||||
if (it == navMeshInputs.end())
|
||||
|
|
|
@ -337,7 +337,7 @@ std::pair<CSMWorld::UniversalId, std::string> CSMWorld::IdTable::view(int row) c
|
|||
return std::make_pair(UniversalId::Type_None, "");
|
||||
|
||||
if (id[0] == '#')
|
||||
id = ESM::Cell::sDefaultWorldspace;
|
||||
id = ESM::Cell::sDefaultWorldspaceId.getValue();
|
||||
|
||||
return std::make_pair(UniversalId(UniversalId::Type_Scene, id), hint);
|
||||
}
|
||||
|
|
|
@ -305,7 +305,8 @@ void CSVWorld::RegionMap::view()
|
|||
}
|
||||
|
||||
emit editRequest(
|
||||
CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspace), hint.str());
|
||||
CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspaceId.getValue()),
|
||||
hint.str());
|
||||
}
|
||||
|
||||
void CSVWorld::RegionMap::viewInTable()
|
||||
|
|
|
@ -47,7 +47,7 @@ CSVWorld::SceneSubView::SceneSubView(const CSMWorld::UniversalId& id, CSMDoc::Do
|
|||
CSVRender::WorldspaceWidget* worldspaceWidget = nullptr;
|
||||
widgetType whatWidget;
|
||||
|
||||
if (Misc::StringUtils::ciEqual(id.getId(), ESM::Cell::sDefaultWorldspace))
|
||||
if (Misc::StringUtils::ciEqual(id.getId(), ESM::Cell::sDefaultWorldspaceId.getValue()))
|
||||
{
|
||||
whatWidget = widget_Paged;
|
||||
|
||||
|
@ -168,7 +168,8 @@ void CSVWorld::SceneSubView::cellSelectionChanged(const CSMWorld::UniversalId& i
|
|||
|
||||
void CSVWorld::SceneSubView::cellSelectionChanged(const CSMWorld::CellSelection& selection)
|
||||
{
|
||||
setUniversalId(CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspace));
|
||||
setUniversalId(
|
||||
CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, ESM::Cell::sDefaultWorldspaceId.getValue()));
|
||||
int size = selection.getSize();
|
||||
|
||||
std::ostringstream stream;
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace MWWorld
|
|||
, mNameID(cell.mName)
|
||||
, mRegion(cell.mRegion)
|
||||
, mId(cell.mId)
|
||||
, mParent(ESM::RefId::stringRefId(ESM::Cell::sDefaultWorldspace))
|
||||
, mParent(ESM::Cell::sDefaultWorldspaceId)
|
||||
, mMood{
|
||||
.mAmbiantColor = cell.mAmbi.mAmbient,
|
||||
.mDirectionalColor = cell.mAmbi.mSunlight,
|
||||
|
|
|
@ -39,8 +39,7 @@ namespace ESM
|
|||
|
||||
namespace ESM
|
||||
{
|
||||
const std::string Cell::sDefaultWorldspace = "sys::default";
|
||||
const RefId Cell::sDefaultWorldspaceId = ESM::RefId::stringRefId(Cell::sDefaultWorldspace);
|
||||
const StringRefId Cell::sDefaultWorldspaceId = StringRefId("sys::default");
|
||||
|
||||
// Some overloaded compare operators.
|
||||
bool operator==(const MovedCellRef& ref, const RefNum& refNum)
|
||||
|
|
|
@ -66,8 +66,7 @@ namespace ESM
|
|||
*/
|
||||
struct Cell
|
||||
{
|
||||
static const std::string sDefaultWorldspace;
|
||||
static const ESM::RefId sDefaultWorldspaceId;
|
||||
static const ESM::StringRefId sDefaultWorldspaceId;
|
||||
|
||||
constexpr static RecNameInts sRecordId = REC_CELL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue