mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-07 23:38:00 +00:00
Revert "fix(Core/Vehicles): defer accessory init to avoid double install" (#25491)
This commit is contained in:
@@ -713,13 +713,6 @@ void Creature::Update(uint32 diff)
|
||||
m_vehicleKit->Reset();
|
||||
}
|
||||
|
||||
if (_triggerVehicleKitInit)
|
||||
{
|
||||
_triggerVehicleKitInit = false;
|
||||
if (m_vehicleKit)
|
||||
m_vehicleKit->Reset();
|
||||
}
|
||||
|
||||
switch (m_deathState)
|
||||
{
|
||||
case DeathState::JustRespawned:
|
||||
@@ -1120,10 +1113,9 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
|
||||
IsAIEnabled = true;
|
||||
i_AI->InitializeAI();
|
||||
|
||||
// Defer vehicle kit init to the next Creature::Update tick so accessories
|
||||
// install after visibility sync.
|
||||
if (GetVehicleKit())
|
||||
_triggerVehicleKitInit = true;
|
||||
// Xinef: Initialize vehicle if it is not summoned!
|
||||
if (GetVehicleKit() && m_spawnId)
|
||||
GetVehicleKit()->Reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user