1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 07:53:51 +00:00

World::World looks good for now, cutting down World::Scene; still the to_utf8 error

This commit is contained in:
Sebastian Wick 2011-08-01 04:11:50 +02:00
parent 64633ddcdb
commit 97e4f698a7
2 changed files with 2 additions and 41 deletions

View file

@ -264,28 +264,6 @@ namespace MWWorld
} }
} }
void World::unloadCell (CellRenderCollection::iterator iter)
{
return mWorldScene->unloadCell(iter);
}
void World::loadCell (Ptr::CellStore *cell, MWRender::CellRender *render)
{
return mWorldScene->loadCell(cell, render);
}
void World::playerCellChange (Ptr::CellStore *cell, const ESM::Position& position,
bool adjustPlayerPos)
{
if (adjustPlayerPos)
mPlayer->setPos (position.pos[0], position.pos[1], position.pos[2], false);
mPlayer->setCell (cell);
// TODO orientation
mEnvironment.mMechanicsManager->addActor (mPlayer->getPlayer());
mEnvironment.mMechanicsManager->watchActor (mPlayer->getPlayer());
}
void World::adjustSky() void World::adjustSky()
{ {
@ -297,11 +275,6 @@ namespace MWWorld
} }
} }
void World::changeCell (int X, int Y, const ESM::Position& position, bool adjustPlayerPos)
{
mWorldScene->changeCell(X, Y, position, adjustPlayerPos);
}
World::World (OEngine::Render::OgreRenderer& renderer, OEngine::Physic::PhysicEngine* physEng, World::World (OEngine::Render::OgreRenderer& renderer, OEngine::Physic::PhysicEngine* physEng,
const Files::Collections& fileCollections, const Files::Collections& fileCollections,
const std::string& master, const boost::filesystem::path& resDir, const std::string& master, const boost::filesystem::path& resDir,
@ -662,7 +635,7 @@ namespace MWWorld
if (currentCell->cell->data.gridX!=cellX || currentCell->cell->data.gridY!=cellY) if (currentCell->cell->data.gridX!=cellX || currentCell->cell->data.gridY!=cellY)
{ {
changeCell (cellX, cellY, mPlayer->getPlayer().getCellRef().pos, false); mWorldScene->changeCell (cellX, cellY, mPlayer->getPlayer().getCellRef().pos, false);
} }
} }

View file

@ -71,8 +71,6 @@ namespace MWWorld
MWWorld::Player *mPlayer; MWWorld::Player *mPlayer;
ESM::ESMReader mEsm; ESM::ESMReader mEsm;
ESMS::ESMStore mStore; ESMS::ESMStore mStore;
std::map<std::string, Ptr::CellStore> mInteriors;
std::map<std::pair<int, int>, Ptr::CellStore> mExteriors;
ScriptList mLocalScripts; ScriptList mLocalScripts;
MWWorld::Globals *mGlobalVariables; MWWorld::Globals *mGlobalVariables;
bool mSky; bool mSky;
@ -94,17 +92,7 @@ namespace MWWorld
int getDaysPerMonth (int month) const; int getDaysPerMonth (int month) const;
void removeScripts (Ptr::CellStore *cell); void removeScripts (Ptr::CellStore *cell);
void unloadCell (CellRenderCollection::iterator iter);
void loadCell (Ptr::CellStore *cell, MWRender::CellRender *render);
void playerCellChange (Ptr::CellStore *cell, const ESM::Position& position,
bool adjustPlayerPos = true);
void changeCell (int X, int Y, const ESM::Position& position, bool adjustPlayerPos);
///< Move from exterior to interior or from interior cell to a different
/// interior cell.
public: public:
World (OEngine::Render::OgreRenderer& renderer, OEngine::Physic::PhysicEngine* physEng, World (OEngine::Render::OgreRenderer& renderer, OEngine::Physic::PhysicEngine* physEng,