mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 12:18:22 +00:00
Move owner override
Mover owner override to be earlier so that we dont try to get the team of an entity that doesnt have a team and may be a child entity of a player. Tested changes with a team of two players and players were correctly given credit for kills
This commit is contained in:
parent
db773e9778
commit
30c8326c3e
@ -696,10 +696,10 @@ void DestroyableComponent::Smash(const LWOOBJID source, const eKillType killType
|
|||||||
|
|
||||||
if (owner != nullptr)
|
if (owner != nullptr)
|
||||||
{
|
{
|
||||||
auto* team = TeamManager::Instance()->GetTeam(owner->GetObjectID());
|
|
||||||
|
|
||||||
owner = owner->GetOwner(); // If the owner is overwritten, we collect that here
|
owner = owner->GetOwner(); // If the owner is overwritten, we collect that here
|
||||||
|
|
||||||
|
auto* team = TeamManager::Instance()->GetTeam(owner->GetObjectID());
|
||||||
|
|
||||||
const auto isEnemy = m_Parent->GetComponent<BaseCombatAIComponent>() != nullptr;
|
const auto isEnemy = m_Parent->GetComponent<BaseCombatAIComponent>() != nullptr;
|
||||||
|
|
||||||
auto* inventoryComponent = owner->GetComponent<InventoryComponent>();
|
auto* inventoryComponent = owner->GetComponent<InventoryComponent>();
|
||||||
|
Loading…
Reference in New Issue
Block a user