fix(Core/Vehicles): Prevent accessory double-install and respawn orphans (#25499)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-04-19 10:09:51 -05:00
committed by GitHub
parent b53e1b8eac
commit 687ceeea70
5 changed files with 24 additions and 8 deletions

View File

@@ -1113,9 +1113,6 @@ bool Creature::AIM_Initialize(CreatureAI* ai)
IsAIEnabled = true;
i_AI->InitializeAI();
// Xinef: Initialize vehicle if it is not summoned!
if (GetVehicleKit() && m_spawnId)
GetVehicleKit()->Reset();
return true;
}
@@ -2052,6 +2049,10 @@ void Creature::Respawn(bool force)
if (getDeathState() == DeathState::Dead)
{
// TempSummons (no m_spawnId) shouldn't be resurrected here; TempSummon::Update UnSummons them on the next tick once deathState is Dead.
if (!m_spawnId && !force)
return;
if (m_spawnId)
{
GetMap()->RemoveCreatureRespawnTime(m_spawnId);