File tree Expand file tree Collapse file tree
Client/mods/deathmatch/logic Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2948,22 +2948,24 @@ void CClientVehicle::Create()
29482948 // We hide all of them by default and only show the ones that match the current variation.
29492949 if (strTemp.rfind (" extra" , 0 ) == 0 )
29502950 {
2951- unsigned int id = atoi (strTemp.substr (5 ).c_str ());
2951+ unsigned int id = std::stoi (strTemp.substr (5 ));
2952+
2953+ auto & component = iter->second ;
29522954
29532955 // Hide extras > 6 by default
29542956 if (id > 6 )
29552957 {
2956- (*iter). second .m_bVisible = false ;
2958+ component .m_bVisible = false ;
29572959 }
29582960
29592961 // Show if matches variant
29602962 if (m_ucVariation > 5 && m_ucVariation < 254 && id == static_cast <unsigned int >(m_ucVariation) + 1 )
29612963 {
2962- (*iter). second .m_bVisible = true ;
2964+ component .m_bVisible = true ;
29632965 }
29642966 if (m_ucVariation2 > 5 && m_ucVariation2 < 254 && id == static_cast <unsigned int >(m_ucVariation2) + 1 )
29652967 {
2966- (*iter). second .m_bVisible = true ;
2968+ component .m_bVisible = true ;
29672969 }
29682970 }
29692971 // set our visibility
You can’t perform that action at this time.
0 commit comments