ReGameDLL_CS icon indicating copy to clipboard operation
ReGameDLL_CS copied to clipboard

ammo check order problem/bug

Open voivodpl opened this issue 1 year ago • 3 comments

Hi. wpn*.cpp I see that some weapons have incorrect ammo check order leaving m_iShotsfired increasing even if there is no ammo in mag. I think it should be first, just after declarations. I just raised it up to 150+ on G3SG1, and as it controls spread and punchangle it leads to huge accuracy problems. Now I know why. Also in AWP etc. it turns off zoom unnecessarily.

voivodpl avatar Feb 08 '24 13:02 voivodpl

Additionally, I am searching for a way to continue reducing m_iShotsfired while reloading and pressing attack buttons.

voivodpl avatar Feb 09 '24 12:02 voivodpl

I think this should be added under the mag check:  m_iShotsFired = 0;

if (m_iClip <= 0)
{
              // code
              m_iShotsFired = 0;
}

voivodpl avatar Feb 09 '24 12:02 voivodpl

Additionally one needs to move the next attack check in CBasePlayer::ItemPostFrame() further into the code, under usableButtons declaration so one can reset the m_iShotsFired:

		if (m_fInReload)
			m_iShotsFired = 0;

voivodpl avatar Feb 09 '24 12:02 voivodpl