1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 17:39:40 +00:00

[Client] Make World::searchPtrViaActorId() also find DedicatedPlayers

This commit is contained in:
David Cernat 2021-07-20 03:43:25 +02:00
parent 9817d3a563
commit a78a88ed6d

View file

@ -803,6 +803,22 @@ namespace MWWorld
// The player is not registered in any CellStore so must be checked manually
if (actorId == getPlayerPtr().getClass().getCreatureStats(getPlayerPtr()).getActorId())
return getPlayerPtr();
/*
Start of tes3mp addition
Make it possible to find dedicated players here as well
*/
else
{
mwmp::DedicatedPlayer* dedicatedPlayer = mwmp::PlayerList::getPlayer(actorId);
if (dedicatedPlayer != nullptr)
{
return dedicatedPlayer->getPtr();
}
}
/*
End of tes3mp addition
*/
// Now search cells
return mWorldScene->searchPtrViaActorId (actorId);
}