mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 14:07:20 +00:00
1497d9b35a
* breakout possessor from char comp Use the correct component for possessor cleanup scirps that were using possessor improperly beginnings of mounts * fix comments added bounds check
22 lines
625 B
C++
22 lines
625 B
C++
#include "PossessorComponent.h"
|
|
|
|
PossessorComponent::PossessorComponent(Entity* parent) : Component(parent) {
|
|
m_Possessable = LWOOBJID_EMPTY;
|
|
}
|
|
|
|
PossessorComponent::~PossessorComponent() {}
|
|
|
|
|
|
|
|
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);
|
|
}
|
|
}
|