mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
[Server] Send player speech and animation packets only to nearby players
This commit is contained in:
parent
2f4cd6b713
commit
1e2517698d
1 changed files with 8 additions and 6 deletions
|
@ -64,9 +64,10 @@ void DialogueFunctions::PlayAnimation(unsigned short pid, const char* groupname,
|
|||
player->animation.count = count;
|
||||
player->animation.persist = persist;
|
||||
|
||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_ANIM_PLAY)->setPlayer(player);
|
||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_ANIM_PLAY)->Send(false);
|
||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_ANIM_PLAY)->Send(true);
|
||||
mwmp::PlayerPacket *packet = mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_ANIM_PLAY);
|
||||
packet->setPlayer(player);
|
||||
packet->Send(false);
|
||||
player->sendToLoaded(packet);
|
||||
}
|
||||
|
||||
void DialogueFunctions::PlaySpeech(unsigned short pid, const char* sound) noexcept
|
||||
|
@ -76,7 +77,8 @@ void DialogueFunctions::PlaySpeech(unsigned short pid, const char* sound) noexce
|
|||
|
||||
player->sound = sound;
|
||||
|
||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SPEECH)->setPlayer(player);
|
||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SPEECH)->Send(false);
|
||||
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SPEECH)->Send(true);
|
||||
mwmp::PlayerPacket *packet = mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SPEECH);
|
||||
packet->setPlayer(player);
|
||||
packet->Send(false);
|
||||
player->sendToLoaded(packet);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue