forked from mirror/openmw-tes3mp
34 lines
775 B
C++
34 lines
775 B
C++
|
//
|
||
|
// Created by koncord on 16.04.17.
|
||
|
//
|
||
|
|
||
|
#ifndef OPENMW_PROCESSORUSERDISCONNECTED_HPP
|
||
|
#define OPENMW_PROCESSORUSERDISCONNECTED_HPP
|
||
|
|
||
|
|
||
|
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
|
||
|
#include "apps/openmw/mwstate/statemanagerimp.hpp"
|
||
|
|
||
|
namespace mwmp
|
||
|
{
|
||
|
class ProcessorUserDisconnected : public PlayerProcessor
|
||
|
{
|
||
|
public:
|
||
|
ProcessorUserDisconnected()
|
||
|
{
|
||
|
BPP_INIT(ID_USER_DISCONNECTED)
|
||
|
avoidReading = true;
|
||
|
}
|
||
|
|
||
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
||
|
{
|
||
|
if (isLocal())
|
||
|
MWBase::Environment::get().getStateManager()->requestQuit();
|
||
|
else
|
||
|
Players::disconnectPlayer(guid);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif //OPENMW_PROCESSORUSERDISCONNECTED_HPP
|