MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Weight

Method Weight

ogsr_engine/xrGame/Weapon.cpp:2007–2019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2005}
2006
2007float CWeapon::Weight() const
2008{
2009 float res = CInventoryItemObject::Weight();
2010 if (GrenadeLauncherAttachable() && IsGrenadeLauncherAttached())
2011 res += pSettings->r_float(GetGrenadeLauncherName(), "inv_weight");
2012 if (ScopeAttachable() && IsScopeAttached())
2013 res += pSettings->r_float(GetScopeName(), "inv_weight");
2014 if (SilencerAttachable() && IsSilencerAttached())
2015 res += pSettings->r_float(GetSilencerName(), "inv_weight");
2016 res += GetMagazineWeight(m_magazine);
2017
2018 return res;
2019}
2020
2021u32 CWeapon::Cost() const
2022{

Callers 9

GetMagazineWeightMethod · 0.45
GetItemWeightMethod · 0.45
CalcTotalWeightMethod · 0.45
CanTakeItemMethod · 0.45
StaminaHitMethod · 0.45
TransferItemMethod · 0.45
InitItemMethod · 0.45
CanMoveToOtherMethod · 0.45
CalcItemsWeightMethod · 0.45

Calls 1

r_floatMethod · 0.45

Tested by

no test coverage detected