Skip to content

Commit

Permalink
[Bugfix] Inversion of cartridges' order when switching to grenade mode
Browse files Browse the repository at this point in the history
Ineffective and potentially buggy code changed to better one.
  • Loading branch information
gunslingermod authored and Xottab-DUTY committed Aug 14, 2017
1 parent 33f0521 commit 449c91a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/xrGame/WeaponMagazinedWGrenade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,22 +176,7 @@ void CWeaponMagazinedWGrenade::PerformSwitchGL()
swap(m_ammoType, m_ammoType2);
swap(m_DefaultCartridge, m_DefaultCartridge2);

xr_vector<CCartridge> l_magazine;
while (m_magazine.size())
{
l_magazine.push_back(m_magazine.back());
m_magazine.pop_back();
}
while (m_magazine2.size())
{
m_magazine.push_back(m_magazine2.back());
m_magazine2.pop_back();
}
while (l_magazine.size())
{
m_magazine2.push_back(l_magazine.back());
l_magazine.pop_back();
}
m_magazine.swap(m_magazine2);
iAmmoElapsed = (int)m_magazine.size();

m_BriefInfo_CalcFrame = 0;
Expand Down

0 comments on commit 449c91a

Please sign in to comment.