| 2005 | } |
| 2006 | |
| 2007 | float 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 | |
| 2021 | u32 CWeapon::Cost() const |
| 2022 | { |
no test coverage detected