mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
update main character model
This commit is contained in:
parent
b1ef0026a9
commit
235b565bb7
@ -310,6 +310,9 @@ namespace MWRender
|
|||||||
|
|
||||||
void Player::setAnimation(NpcAnimation *anim)
|
void Player::setAnimation(NpcAnimation *anim)
|
||||||
{
|
{
|
||||||
|
if (mAnimation) {
|
||||||
|
delete mAnimation;
|
||||||
|
}
|
||||||
mAnimation = anim;
|
mAnimation = anim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -801,7 +801,21 @@ namespace MWWorld
|
|||||||
|
|
||||||
const ESM::NPC *World::createRecord(const ESM::NPC &record)
|
const ESM::NPC *World::createRecord(const ESM::NPC &record)
|
||||||
{
|
{
|
||||||
return mStore.insert(record);
|
bool update = false;
|
||||||
|
if (StringUtils::ciEqual(record.mId, "player")) {
|
||||||
|
const ESM::NPC *player =
|
||||||
|
mPlayer->getPlayer().get<ESM::NPC>()->mBase;
|
||||||
|
|
||||||
|
update = record.isMale() != player->isMale() ||
|
||||||
|
!StringUtils::ciEqual(record.mRace, player->mRace) ||
|
||||||
|
!StringUtils::ciEqual(record.mHead, player->mHead) ||
|
||||||
|
!StringUtils::ciEqual(record.mHair, player->mHair);
|
||||||
|
}
|
||||||
|
const ESM::NPC *ret = mStore.insert(record);
|
||||||
|
if (update) {
|
||||||
|
mRendering->renderPlayer(mPlayer->getPlayer());
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
|
void World::playAnimationGroup (const MWWorld::Ptr& ptr, const std::string& groupName, int mode,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user