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:
parent
9817d3a563
commit
a78a88ed6d
1 changed files with 16 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue