3622 {
3624 float totalWeight;
3625 if (inventory)
3626 {
3627 int i = 0;
3629 for (i = 0; i < AttachmentsCount; ++i)
3630 {
3632 }
3633
3634 CargoBase cargo = inventory.
GetCargo();
3635 if (cargo)
3636 {
3638 for (i = 0; i < cargoCount; ++i)
3639 {
3640 totalWeight += cargo.
GetItem(i).GetWeightEx(forceRecalc);
3641 }
3642 }
3643 }
3644 return totalWeight;
3645 }
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.