5406 {
5407 const int VISIBILITY_SLOTS_COUNT = 10;
5408
5409 int attcount = GetInventory().AttachmentCount();
5410 float sumVisibility = 0;
5411 float countVisibility = 0;
5412 float visibilityMean = 0;
5413
5414 if (attcount > 0)
5415 {
5416 for (int att = 0; att < attcount; att++)
5417 {
5418 EntityAI attachment = GetInventory().GetAttachmentFromIndex(att);
5419 if (attachment.IsClothing())
5420 {
5422 Class.CastTo(clothing, attachment);
5423 sumVisibility += clothing.GetItemVisibility();
5424 countVisibility++;
5425 }
5426 }
5427
5428 visibilityMean = (sumVisibility + (VISIBILITY_SLOTS_COUNT - countVisibility)) / VISIBILITY_SLOTS_COUNT;
5430 }
5431 else
5432 {
5433 visibilityMean = 1;
5435 }
5436 }
void SetVisibilityCoef(float pVisibility)