Fixed visual bug where accessory could detach from vehicle on client (#18590)

Closes #15153
This commit is contained in:
xinef1
2017-01-11 12:30:22 +01:00
committed by Keader
parent e795d31381
commit 2e635cf3cf

View File

@@ -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;