Skip to content

Commit b4c412f

Browse files
gunslingermodXottab-DUTY
authored andcommitted
[Bugfix] incorrect ammotype changing fix
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.
1 parent 6cebfa2 commit b4c412f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xrGame/WeaponMagazined.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ bool CWeaponMagazined::TryReload()
201201
m_pCurrentAmmo = smart_cast<CWeaponAmmo*>(m_pInventory->GetAny(m_ammoTypes[i].c_str()));
202202
if (m_pCurrentAmmo)
203203
{
204-
m_ammoType = i;
204+
m_set_next_ammoType_on_reload = i;
205205
SetPending(TRUE);
206206
SwitchState(eReload);
207207
return true;

0 commit comments

Comments
 (0)