mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:23:52 +00:00
[Server] Send ActorAuthority packets to all players who loaded the cell
This commit is contained in:
parent
63dd2d9246
commit
e01cadad23
1 changed files with 9 additions and 2 deletions
|
@ -232,8 +232,15 @@ void ActorFunctions::SendActorList() noexcept
|
||||||
|
|
||||||
void ActorFunctions::SendActorAuthority() noexcept
|
void ActorFunctions::SendActorAuthority() noexcept
|
||||||
{
|
{
|
||||||
mwmp::Networking::get().getActorPacketController()->GetPacket(ID_ACTOR_AUTHORITY)->setActorList(&writeActorList);
|
mwmp::ActorPacket *authorityPacket = mwmp::Networking::get().getActorPacketController()->GetPacket(ID_ACTOR_AUTHORITY);
|
||||||
mwmp::Networking::get().getActorPacketController()->GetPacket(ID_ACTOR_AUTHORITY)->Send(writeActorList.guid);
|
authorityPacket->setActorList(&writeActorList);
|
||||||
|
authorityPacket->Send(writeActorList.guid);
|
||||||
|
|
||||||
|
// Also send this to everyone else who has the cell loaded
|
||||||
|
Cell *serverCell = CellController::get()->getCell(&writeActorList.cell);
|
||||||
|
|
||||||
|
if (serverCell != nullptr)
|
||||||
|
serverCell->sendToLoaded(authorityPacket, &writeActorList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActorFunctions::SendActorPosition() noexcept
|
void ActorFunctions::SendActorPosition() noexcept
|
||||||
|
|
Loading…
Reference in a new issue