mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 04:19:55 +00:00
27 lines
668 B
C++
27 lines
668 B
C++
#ifndef OPENMW_PROCESSORPLAYERATTACK_HPP
|
|
#define OPENMW_PROCESSORPLAYERATTACK_HPP
|
|
|
|
#include "apps/openmw/mwmp/Main.hpp"
|
|
#include "../PlayerProcessor.hpp"
|
|
#include "apps/openmw/mwmp/MechanicsHelper.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerAttack : public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerAttack()
|
|
{
|
|
BPP_INIT(ID_PLAYER_ATTACK)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
if (player != 0)
|
|
MechanicsHelper::processAttack(player->attack, static_cast<DedicatedPlayer*>(player)->getPtr());
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERATTACK_HPP
|