5129 {
5130 const int VISIBILITY_SLOTS_COUNT = 10;
5131
5132 int attcount = GetInventory().AttachmentCount();
5133 float sumVisibility = 0;
5134 float countVisibility = 0;
5135 float visibilityMean = 0;
5136
5137 if (attcount > 0)
5138 {
5139 for (int att = 0; att < attcount; att++)
5140 {
5141 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
5142 if (attachment.IsClothing())
5143 {
5145 Class.CastTo(clothing, attachment);
5146 sumVisibility += clothing.GetItemVisibility();
5147 countVisibility++;
5148 }
5149 }
5150
5151 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
5153 }
5154 else
5155 {
5156 visibilityMean = 1;
5158 }
5159 }
void SetVisibilityCoef(float pVisibility)