Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Lowered weapon shooting fix for HL2. #408

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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