4975 {
4976 const int VISIBILITY_SLOTS_COUNT = 10;
4977
4978 int attcount = GetInventory().AttachmentCount();
4979 float sumVisibility = 0;
4980 float countVisibility = 0;
4981 float visibilityMean = 0;
4982
4983 if (attcount > 0)
4984 {
4985 for (int att = 0; att < attcount; att++)
4986 {
4987 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
4988 if (attachment.IsClothing())
4989 {
4991 Class.CastTo(clothing, attachment);
4992 sumVisibility += clothing.GetItemVisibility();
4993 countVisibility++;
4994 }
4995 }
4996
4997 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
4999 }
5000 else
5001 {
5002 visibilityMean = 1;
5004 }
5005 }
void SetVisibilityCoef(float pVisibility)