1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 04:49:54 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerSpeech.hpp

30 lines
783 B
C++
Raw Normal View History

#ifndef OPENMW_PROCESSORPLAYERSPEECH_HPP
#define OPENMW_PROCESSORPLAYERSPEECH_HPP
2017-06-06 16:06:10 +00:00
#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