mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Fixed visual bug where accessory could detach from vehicle on client (#18590)
Closes #15153
This commit is contained in:
@@ -1578,6 +1578,14 @@ bool WorldObject::CanSeeOrDetect(WorldObject const* obj, bool ignoreStealth, boo
|
||||
corpseVisibility = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Unit const* target = obj->ToUnit())
|
||||
{
|
||||
// Don't allow to detect vehicle accessories if you can't see vehicle
|
||||
if (Unit const* vehicle = target->GetVehicleBase())
|
||||
if (!thisPlayer->HaveAtClient(vehicle))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
WorldObject const* viewpoint = this;
|
||||
|
||||
Reference in New Issue
Block a user