Skip to content

Commit

Permalink
[Bugfix] incorrect ammotype changing fix
Browse files Browse the repository at this point in the history
When you try to reload weapon but count of ammos in your inventory is not enought for full magazine, ammo's iconcould instantly change to an icon of next ammotype.
Also the bug could lead to another kind of behavior. Take into your hands a weapon with not full mag and without ammo of current ammo type in the inventory. Start reload or changing ammotype and (without waiting until the action is finished) drop the weapon. Then take it back to the hands. The key for ammotype changing won't work.
  • Loading branch information
gunslingermod authored and Xottab-DUTY committed Aug 14, 2017
1 parent 6cebfa2 commit b4c412f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xrGame/WeaponMagazined.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ bool CWeaponMagazined::TryReload()
m_pCurrentAmmo = smart_cast<CWeaponAmmo*>(m_pInventory->GetAny(m_ammoTypes[i].c_str()));
if (m_pCurrentAmmo)
{
m_ammoType = i;
m_set_next_ammoType_on_reload = i;
SetPending(TRUE);
SwitchState(eReload);
return true;
Expand Down

0 comments on commit b4c412f

Please sign in to comment.