|
|
|
@ -163,7 +163,8 @@ namespace MWWorld
|
|
|
|
|
ToUTF8::Utf8Encoder* encoder, const std::map<std::string,std::string>& fallbackMap, int mActivationDistanceOverride)
|
|
|
|
|
: mPlayer (0), mLocalScripts (mStore), mGlobalVariables (0),
|
|
|
|
|
mSky (true), mCells (mStore, mEsm),
|
|
|
|
|
mNumFacing(0), mActivationDistanceOverride (mActivationDistanceOverride),mFallback(fallbackMap)
|
|
|
|
|
mNumFacing(0), mActivationDistanceOverride (mActivationDistanceOverride),
|
|
|
|
|
mFallback(fallbackMap), mNewGame(newGame)
|
|
|
|
|
{
|
|
|
|
|
mPhysics = new PhysicsSystem(renderer);
|
|
|
|
|
mPhysEngine = mPhysics->getEngine();
|
|
|
|
@ -214,7 +215,7 @@ namespace MWWorld
|
|
|
|
|
// global variables
|
|
|
|
|
mGlobalVariables = new Globals (mStore);
|
|
|
|
|
|
|
|
|
|
if (newGame)
|
|
|
|
|
if (mNewGame)
|
|
|
|
|
{
|
|
|
|
|
// set new game mark
|
|
|
|
|
mGlobalVariables->setInt ("chargenstate", 1);
|
|
|
|
@ -1474,12 +1475,12 @@ namespace MWWorld
|
|
|
|
|
return mRendering->vanityRotateCamera(rot);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void World::setupPlayer(bool newGame)
|
|
|
|
|
void World::setupPlayer()
|
|
|
|
|
{
|
|
|
|
|
const ESM::NPC* player = mStore.get<ESM::NPC>().find ("player");
|
|
|
|
|
mPlayer = new MWWorld::Player (player, *this);
|
|
|
|
|
mRendering->attachCameraTo(mPlayer->getPlayer());
|
|
|
|
|
if (newGame)
|
|
|
|
|
if (mNewGame)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::Class::get(mPlayer->getPlayer()).getContainerStore(mPlayer->getPlayer()).fill(player->mInventory, "", mStore);
|
|
|
|
|
MWWorld::Class::get(mPlayer->getPlayer()).getInventoryStore(mPlayer->getPlayer()).autoEquip (mPlayer->getPlayer());
|
|
|
|
@ -1490,6 +1491,8 @@ namespace MWWorld
|
|
|
|
|
{
|
|
|
|
|
mRendering->renderPlayer(mPlayer->getPlayer());
|
|
|
|
|
mPhysics->addActor(mPlayer->getPlayer());
|
|
|
|
|
if (mNewGame)
|
|
|
|
|
toggleCollisionMode();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void World::setupExternalRendering (MWRender::ExternalRendering& rendering)
|
|
|
|
|