| 2145 | bool CWeapon::IsPartlyReloading() const { return (ef_weapon_type() == 10 || m_set_next_ammoType_on_reload == u32(-1)) && GetAmmoElapsed() > 0 && !IsMisfire(); } |
| 2146 | |
| 2147 | void CWeapon::SaveAttachableParams() |
| 2148 | { |
| 2149 | const char* sect_name = cNameSect().c_str(); |
| 2150 | string_path buff; |
| 2151 | FS.update_path(buff, "$logs$", make_string("_world\\%s.ltx", sect_name).c_str()); |
| 2152 | |
| 2153 | CInifile pHudCfg(buff, FALSE, FALSE, TRUE); |
| 2154 | |
| 2155 | sprintf_s(buff, "%f,%f,%f", m_Offset.c.x, m_Offset.c.y, m_Offset.c.z); |
| 2156 | pHudCfg.w_string(sect_name, "position", buff); |
| 2157 | |
| 2158 | Fvector ypr; |
| 2159 | m_Offset.getHPB(ypr.x, ypr.y, ypr.z); |
| 2160 | ypr.mul(180.f / PI); |
| 2161 | sprintf_s(buff, "%f,%f,%f", ypr.x, ypr.y, ypr.z); |
| 2162 | pHudCfg.w_string(sect_name, "orientation", buff); |
| 2163 | |
| 2164 | if (pSettings->line_exist(sect_name, "strap_position") && pSettings->line_exist(sect_name, "strap_orientation")) |
| 2165 | { |
| 2166 | sprintf_s(buff, "%f,%f,%f", m_StrapOffset.c.x, m_StrapOffset.c.y, m_StrapOffset.c.z); |
| 2167 | pHudCfg.w_string(sect_name, "strap_position", buff); |
| 2168 | m_StrapOffset.getHPB(ypr.x, ypr.y, ypr.z); |
| 2169 | ypr.mul(180.f / PI); |
| 2170 | sprintf_s(buff, "%f,%f,%f", ypr.x, ypr.y, ypr.z); |
| 2171 | pHudCfg.w_string(sect_name, "strap_orientation", buff); |
| 2172 | } |
| 2173 | |
| 2174 | Msg("--[%s] data saved to [%s]", __FUNCTION__, pHudCfg.fname()); |
| 2175 | } |
| 2176 | |
| 2177 | void CWeapon::UpdateVisualBullets() |
| 2178 | { |
nothing calls this directly
no test coverage detected