From acb1335d78bc73b20c25b0bc1460f05c16ba24b3 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 13 Apr 2018 09:50:13 +0300 Subject: [PATCH] [Client] Make creature disguises update correctly --- apps/openmw/mwmp/DedicatedPlayer.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwmp/DedicatedPlayer.cpp b/apps/openmw/mwmp/DedicatedPlayer.cpp index 80f6216ac..5b26e63ab 100644 --- a/apps/openmw/mwmp/DedicatedPlayer.cpp +++ b/apps/openmw/mwmp/DedicatedPlayer.cpp @@ -159,7 +159,9 @@ void DedicatedPlayer::setBaseInfo() reloadPtr(); } - setEquipment(); + // Only set equipment if the player isn't disguised as a creature + if (ptr.getTypeName() == typeid(ESM::NPC).name()) + setEquipment(); previousRace = npc.mRace; } @@ -192,19 +194,22 @@ void DedicatedPlayer::setShapeshift() if (creatureRecordId.empty()) { creature.mId = "Dedicated Player"; - creatureRecordId = RecordHelper::createCreatureRecord(creature); + creature.mId = creatureRecordId = RecordHelper::createCreatureRecord(creature); LOG_APPEND(Log::LOG_INFO, "- Creating new creature record %s", creatureRecordId.c_str()); } - - creature.mId = creatureRecordId; + else + { + creature.mId = creatureRecordId; + RecordHelper::updateCreatureRecord(creature); + } if (!reference) { + LOG_APPEND(Log::LOG_INFO, "- Creating reference for %s", creature.mId.c_str()); createReference(creature.mId); } else { - RecordHelper::updateCreatureRecord(creature); reloadPtr(); } }