gta-reversed / gta-reversed-modern

Reimplementation of GTA:SA 1.0 US

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`CPed::GrantAmmo`, doesn't grant it

Frouk3 opened this issue · comments

commented

wepInSlot.m_nTotalAmmo = std::min(ammo, 99'999u); // Clamp upper

it sets the ammo instead of granting it
simple change from = to +=

Indeed, should be:

wepInSlot.m_nTotalAmmo = std::min(wepInSlot.m_nTotalAmmo + ammo, 99'999u); // Clamp upper 
commented

oh yeah, i just thought about the clamping