2017-05-29 01:43:52 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERSPEECH_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERSPEECH_HPP
|
|
|
|
|
2017-06-06 16:06:10 +00:00
|
|
|
#include "../PlayerProcessor.hpp"
|
2017-05-29 01:43:52 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2019-10-24 19:16:17 +00:00
|
|
|
class ProcessorPlayerSpeech final: public PlayerProcessor
|
2017-05-29 01:43:52 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerSpeech()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_SPEECH)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
2017-10-31 13:19:14 +00:00
|
|
|
if (isLocal())
|
|
|
|
{
|
2019-08-19 18:39:33 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_SPEECH about LocalPlayer from server");
|
2017-10-31 13:19:14 +00:00
|
|
|
static_cast<LocalPlayer*>(player)->playSpeech();
|
|
|
|
}
|
|
|
|
else if (player != 0)
|
|
|
|
static_cast<DedicatedPlayer*>(player)->playSpeech();
|
2017-05-29 01:43:52 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERSPEECH_HPP
|