fix(Core/Vehicle): Fix invisible vehicle passengers (#23406)

This commit is contained in:
killerwife
2025-10-26 02:25:43 +01:00
committed by GitHub
parent dfd21be75b
commit 1b2db00701
7 changed files with 77 additions and 38 deletions

View File

@@ -423,7 +423,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
if (_me->IsInWorld())
{
unit->SendClearTarget(); // SMSG_BREAK_TARGET
unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
unit->SetControlled(true, UNIT_STATE_ROOT); // SMSG_FORCE_ROOT - In some cases we send SMSG_SPLINE_MOVE_ROOT here (for creatures)
if (unit->IsPlayer())
unit->ToPlayer()->SetExpectingChangeTransport(true);
// also adds MOVEMENTFLAG_ROOT
Movement::MoveSplineInit init(unit);
init.DisableTransportPathTransformations();