3581 {
3583 float totalWeight;
3584 if (inventory)
3585 {
3586 int i = 0;
3588 for (i = 0; i < AttachmentsCount; ++i)
3589 {
3591 }
3592
3593 CargoBase cargo = inventory.
GetCargo();
3594 if (cargo)
3595 {
3597 for (i = 0; i < cargoCount; ++i)
3598 {
3599 totalWeight += cargo.
GetItem(i).GetWeightEx(forceRecalc);
3600 }
3601 }
3602 }
3603 return totalWeight;
3604 }
proto native int GetItemCount()
proto native EntityAI GetItem(int index)
proto native GameInventory GetInventory()
proto native EntityAI GetAttachmentFromIndex(int index)
proto native CargoBase GetCargo()
cargo
proto native int AttachmentCount()
Returns count of attachments attached to this item.