mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-08 11:44:11 +00:00
Rename some variables
- Add order for loading Components - Enforce all components have Entity* in the first argument
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
PossessableComponent::PossessableComponent(Entity* parent, uint32_t componentId) : Component(parent) {
|
||||
m_Possessor = LWOOBJID_EMPTY;
|
||||
CDItemComponent item = Inventory::FindItemComponent(m_OwningEntity->GetLOT());
|
||||
CDItemComponent item = Inventory::FindItemComponent(m_ParentEntity->GetLOT());
|
||||
m_AnimationFlag = static_cast<eAnimationFlags>(item.animationFlag);
|
||||
|
||||
// Get the possession Type from the CDClient
|
||||
@@ -44,12 +44,12 @@ void PossessableComponent::Serialize(RakNet::BitStream* outBitStream, bool bIsIn
|
||||
|
||||
void PossessableComponent::Dismount() {
|
||||
SetPossessor(LWOOBJID_EMPTY);
|
||||
if (m_ItemSpawned) m_OwningEntity->ScheduleKillAfterUpdate();
|
||||
if (m_ItemSpawned) m_ParentEntity->ScheduleKillAfterUpdate();
|
||||
}
|
||||
|
||||
void PossessableComponent::OnUse(Entity* originator) {
|
||||
auto* possessor = originator->GetComponent<PossessorComponent>();
|
||||
if (possessor) {
|
||||
possessor->Mount(m_OwningEntity);
|
||||
possessor->Mount(m_ParentEntity);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user