2021-12-05 17:54:36 +00:00
|
|
|
#include "PossessorComponent.h"
|
|
|
|
|
2022-06-29 23:50:24 +00:00
|
|
|
PossessorComponent::PossessorComponent(Entity* parent) : Component(parent) {
|
|
|
|
m_Possessable = LWOOBJID_EMPTY;
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
|
2022-06-29 23:50:24 +00:00
|
|
|
PossessorComponent::~PossessorComponent() {}
|
2021-12-05 17:54:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-29 23:50:24 +00:00
|
|
|
void PossessorComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags) {
|
|
|
|
outBitStream->Write(m_DirtyPossesor || bIsInitialUpdate);
|
|
|
|
if (m_DirtyPossesor || bIsInitialUpdate) {
|
|
|
|
m_DirtyPossesor = false;
|
|
|
|
outBitStream->Write(m_Possessable != LWOOBJID_EMPTY);
|
|
|
|
if (m_Possessable != LWOOBJID_EMPTY) {
|
|
|
|
outBitStream->Write(m_Possessable);
|
|
|
|
}
|
|
|
|
outBitStream->Write(m_PossessableType);
|
|
|
|
}
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|