The Handgun/Pistol fires two rounds from a single click. A normal-length click (the ~100-150 ms a human holds the button) drains the clip from 10 to 8. It should fire one round per press, as the pistol is semi-auto (GetMustPressTriggerForEachShot() returns true).
Repro: join marines, select the pistol, fire single clicks — the clip drops by 2 each time.
Not an engine issue. Reproduced identically on GoldSrc (Steam, this 3.3b9 build) and on Xash3D-FWGS. And the classic 3.0 client dll (March 2005) fires one round per click correctly under the same engine, so this is a regression in the mod code introduced somewhere between 3.0 and 3.3b9, not an engine bug.
Where it seems to live: the semi-auto gate is m_fInAttack in AvHBasePlayerWeapon::ProcessValidAttack() (only valid if !GetMustPressTriggerForEachShot() || !m_fInAttack). PrimaryAttack() sets m_fInAttack = TRUE; WeaponIdle() clears it. The symptom means m_fInAttack is getting cleared mid-hold, so once the ROF cooldown elapses a second shot slips through before the button is released. Suspicious area: the manual timer bookkeeping in AvHBasePlayerWeapon::ItemPostFrame() (it decrements m_flNextPrimaryAttack and m_flTimeWeaponIdle by cmd.msec on top of the SDK's own ItemPostFrame handling). A git blame/diff of the weapon code against 3.0-3.1 should pinpoint the change.
The Handgun/Pistol fires two rounds from a single click. A normal-length click (the ~100-150 ms a human holds the button) drains the clip from 10 to 8. It should fire one round per press, as the pistol is semi-auto (
GetMustPressTriggerForEachShot()returnstrue).Repro: join marines, select the pistol, fire single clicks — the clip drops by 2 each time.
Not an engine issue. Reproduced identically on GoldSrc (Steam, this 3.3b9 build) and on Xash3D-FWGS. And the classic 3.0 client dll (March 2005) fires one round per click correctly under the same engine, so this is a regression in the mod code introduced somewhere between 3.0 and 3.3b9, not an engine bug.
Where it seems to live: the semi-auto gate is
m_fInAttackinAvHBasePlayerWeapon::ProcessValidAttack()(only valid if!GetMustPressTriggerForEachShot() || !m_fInAttack).PrimaryAttack()setsm_fInAttack = TRUE;WeaponIdle()clears it. The symptom meansm_fInAttackis getting cleared mid-hold, so once the ROF cooldown elapses a second shot slips through before the button is released. Suspicious area: the manual timer bookkeeping inAvHBasePlayerWeapon::ItemPostFrame()(it decrementsm_flNextPrimaryAttackandm_flTimeWeaponIdlebycmd.msecon top of the SDK's ownItemPostFramehandling). A git blame/diff of the weapon code against 3.0-3.1 should pinpoint the change.