1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

[General] Remove attackerGuid from mwmp::Attack because it is redundant

This commit is contained in:
David Cernat 2017-04-17 18:03:33 +03:00
parent 340ad09c97
commit 9882ceedf3
4 changed files with 0 additions and 5 deletions

View file

@ -930,7 +930,6 @@ namespace MWClass
{
mwmp::Attack *attack = &mwmp::Main::get().getLocalPlayer()->attack;
attack->damage = damage;
attack->attackerGuid = mwmp::Main::get().getLocalPlayer()->guid;
attack->targetGuid = victimPlayer->guid;
attack->knockdown = getCreatureStats(ptr).getKnockedDown();
mwmp::Main::get().getLocalPlayer()->sendAttack(mwmp::Attack::MELEE); // todo: make this sensitive to different weapon types

View file

@ -532,7 +532,6 @@ void LocalPlayer::updateAttackState(bool forceUpdate)
{
const string &spell = MWBase::Environment::get().getWindowManager()->getSelectedSpell();
attack.attackerGuid = guid;
attack.type = Attack::MAGIC;
attack.pressed = true;
attack.spellId = spell;
@ -1197,7 +1196,6 @@ void LocalPlayer::prepareAttack(Attack::TYPE type, bool state)
attack.knockdown = false;
attack.block = false;
attack.targetGuid = RakNet::RakNetGUID();
attack.attackerGuid = guid;
getNetworking()->getPlayerPacket(ID_PLAYER_ATTACK)->setPlayer(this);
getNetworking()->getPlayerPacket(ID_PLAYER_ATTACK)->Send();

View file

@ -9,7 +9,6 @@ namespace mwmp
{
public:
RakNet::RakNetGUID targetGuid;
RakNet::RakNetGUID attackerGuid;
char type; // 0 - melee, 1 - magic, 2 - throwable
enum TYPE

View file

@ -16,7 +16,6 @@ void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
RW(player->attack.attackerGuid, send);
RW(player->attack.targetGuid, send);
RW(player->attack.spellId, send);