Player::Player (MWRender::Player *renderer, const ESM::NPC *player, MWWorld::World& world) : mCellStore (0), mRenderer (renderer), mWorld (world), mClass (0), mCollisionMode (true) { mPlayer.base = player; mName = player->name; mMale = !(player->flags & ESM::NPC::Female); mRace = player->race; mPlayer.ref.pos.pos[0] = mPlayer.ref.pos.pos[1] = mPlayer.ref.pos.pos[2] = 0; mClass = new ESM::Class (*world.getStore().classes.find (player->cls)); }
Player::Player (MWRender::Player *renderer, const ESM::NPC *player, MWWorld::World& world) : mCellStore (0), mRenderer (renderer), mWorld (world), mClass (0), mAutoMove (false), mForwardBackward (0) { mPlayer.base = player; mPlayer.ref.refID = "player"; mName = player->name; mMale = !(player->flags & ESM::NPC::Female); mRace = player->race; float* playerPos = mPlayer.mData.getPosition().pos; playerPos[0] = playerPos[1] = playerPos[2] = 0; mPlayer.mData.setBaseNode(renderer->getNode()); /// \todo Do not make a copy of classes defined in esm/p records. mClass = new ESM::Class (*world.getStore().classes.find (player->cls)); }