SuperMarioOdysseyOnline/include/packets/PlayerInfPacket.h

34 lines
988 B
C
Raw Normal View History

2022-06-16 21:33:18 +00:00
#pragma once
#include "Packet.h"
#include "al/util.hpp"
#include "algorithms/PlayerAnims.h"
struct PACKED PlayerInf : Packet {
2022-06-16 21:33:18 +00:00
PlayerInf() : Packet() {mType = PacketType::PLAYERINF; mPacketSize = sizeof(PlayerInf) - sizeof(Packet);};
sead::Vector3f playerPos;
2022-06-16 21:33:18 +00:00
sead::Quatf playerRot;
float animBlendWeights[6];
PlayerAnims::Type actName;
PlayerAnims::Type subActName;
bool operator==(const PlayerInf &rhs) const {
bool isWeightsEqual = true;
for (size_t i = 0; i < 6; i++)
{
if(animBlendWeights[i] != rhs.animBlendWeights[i]) {
isWeightsEqual = false;
break;
}
}
return (
playerPos == rhs.playerPos &&
playerRot == rhs.playerRot &&
isWeightsEqual &&
actName == rhs.actName &&
subActName == rhs.subActName
);
}
bool operator!=(const PlayerInf& rhs) const { return !operator==(rhs); }
};