1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 12:49:56 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerSpeech.hpp
2017-10-31 15:19:14 +02:00

29 lines
773 B
C++

#ifndef OPENMW_PROCESSORPLAYERSPEECH_HPP
#define OPENMW_PROCESSORPLAYERSPEECH_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerSpeech : public PlayerProcessor
{
public:
ProcessorPlayerSpeech()
{
BPP_INIT(ID_PLAYER_SPEECH)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
LOG_MESSAGE_SIMPLE(Log::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