Revert "fix(Core/Vehicles): defer accessory init to avoid double install" (#25491)
This commit is contained in:
parent
b40a978938
commit
589784baa0
3 changed files with 8 additions and 14 deletions
|
|
@ -346,6 +346,11 @@ bool Map::AddToMap(T* obj, bool checkTransport)
|
|||
//also, trigger needs to cast spell, if not update, cannot see visual
|
||||
obj->UpdateObjectVisibility(true);
|
||||
|
||||
// Xinef: little hack for vehicles, accessories have to be added after visibility update so they wont fall off the vehicle, moved from Creature::AIM_Initialize
|
||||
// Initialize vehicle, this is done only for summoned npcs, DB creatures are handled by grid loaders
|
||||
if (obj->IsCreature())
|
||||
if (Vehicle* vehicle = obj->ToCreature()->GetVehicleKit())
|
||||
vehicle->Reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue