4985 {
4986 const int VISIBILITY_SLOTS_COUNT = 10;
4987
4988 int attcount = GetInventory().AttachmentCount();
4989 float sumVisibility = 0;
4990 float countVisibility = 0;
4991 float visibilityMean = 0;
4992
4993 if (attcount > 0)
4994 {
4995 for (int att = 0; att < attcount; att++)
4996 {
4997 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
4998 if (attachment.IsClothing())
4999 {
5001 Class.CastTo(clothing, attachment);
5002 sumVisibility += clothing.GetItemVisibility();
5003 countVisibility++;
5004 }
5005 }
5006
5007 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
5009 }
5010 else
5011 {
5012 visibilityMean = 1;
5014 }
5015 }
void SetVisibilityCoef(float pVisibility)