Skip to content

Conversation

celisej567
Copy link

@celisej567 celisej567 commented Jan 2, 2025

Almost all shooting weapons uses CBaseHLCombatWeapon as a base. Lowering system coded in there. But the Attack code are in CBaseCombatWeapon instead. And lowered weapon, that should not fire, still fires, because CBaseCombatWeapon class dont know is weapon lowered or not.

I fixed it by moving SERVERSIDE m_bLowered and m_flRaiseTime from CBaseHLCombatWeapon to CBaseCombatWeapon. I think this way of fixing this bug is ok, because even tho CBaseCombatWeapon doesnt to do any calculations and checks for lowering weapon, it still have Lower() and CanLower() functions. They just always return false. To prevent anything bad happening for weapons that doesn't use lowering system, i didn't change this functions.

Also i manually fixed it in shotgun. There is their own Attack code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant