mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
breakout possessor from char comp (#606)
* 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
This commit is contained in:
@@ -986,19 +986,11 @@ void InventoryComponent::EquipItem(Item* item, const bool skipChecks)
|
||||
// #107
|
||||
auto* possessorComponent = m_Parent->GetComponent<PossessorComponent>();
|
||||
|
||||
if (possessorComponent != nullptr)
|
||||
{
|
||||
previousPossessorID = possessorComponent->GetPossessable();
|
||||
possessorComponent->SetPossessable(carEntity->GetObjectID());
|
||||
}
|
||||
if (possessorComponent) possessorComponent->SetPossessable(carEntity->GetObjectID());
|
||||
|
||||
auto* characterComponent = m_Parent->GetComponent<CharacterComponent>();
|
||||
|
||||
if (characterComponent != nullptr)
|
||||
{
|
||||
characterComponent->SetIsRacing(true);
|
||||
characterComponent->SetVehicleObjectID(carEntity->GetObjectID());
|
||||
}
|
||||
if (characterComponent) characterComponent->SetIsRacing(true);
|
||||
|
||||
EntityManager::Instance()->ConstructEntity(carEntity);
|
||||
EntityManager::Instance()->SerializeEntity(m_Parent);
|
||||
|
Reference in New Issue
Block a user