forked from teamnwah/openmw-tes3coop
[Client] Prevent errors from NPC-only packets for DedicatedPlayers
This commit is contained in:
parent
68ee64902d
commit
716809f2db
2 changed files with 7 additions and 0 deletions
|
@ -276,6 +276,9 @@ void DedicatedPlayer::setAnimFlags()
|
||||||
|
|
||||||
void DedicatedPlayer::setEquipment()
|
void DedicatedPlayer::setEquipment()
|
||||||
{
|
{
|
||||||
|
// Go no further if the player is disguised as a creature
|
||||||
|
if (!ptr.getClass().hasInventoryStore(ptr)) return;
|
||||||
|
|
||||||
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
|
MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr);
|
||||||
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)
|
for (int slot = 0; slot < MWWorld::InventoryStore::Slots; ++slot)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,10 @@ namespace mwmp
|
||||||
else if (player != 0)
|
else if (player != 0)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr ptrPlayer = static_cast<DedicatedPlayer *>(player)->getPtr();
|
MWWorld::Ptr ptrPlayer = static_cast<DedicatedPlayer *>(player)->getPtr();
|
||||||
|
|
||||||
|
// Go no further if the player is disguised as a creature
|
||||||
|
if (ptrPlayer.getTypeName() != typeid(ESM::NPC).name()) return;
|
||||||
|
|
||||||
MWMechanics::NpcStats *ptrNpcStats = &ptrPlayer.getClass().getNpcStats(ptrPlayer);
|
MWMechanics::NpcStats *ptrNpcStats = &ptrPlayer.getClass().getNpcStats(ptrPlayer);
|
||||||
MWMechanics::SkillValue skillValue;
|
MWMechanics::SkillValue skillValue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue