mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 00:49:54 +00:00
a74bf1baec
(cherry picked from commit 7748e582a8
)
29 lines
783 B
C++
29 lines
783 B
C++
#ifndef OPENMW_PROCESSORPLAYERSPEECH_HPP
|
|
#define OPENMW_PROCESSORPLAYERSPEECH_HPP
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerSpeech final: public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerSpeech()
|
|
{
|
|
BPP_INIT(ID_PLAYER_SPEECH)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
if (isLocal())
|
|
{
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_SPEECH about LocalPlayer from server");
|
|
static_cast<LocalPlayer*>(player)->playSpeech();
|
|
}
|
|
else if (player != 0)
|
|
static_cast<DedicatedPlayer*>(player)->playSpeech();
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERSPEECH_HPP
|