-
Notifications
You must be signed in to change notification settings - Fork 639
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
Loading a saved game where the active weapon has partially empty clip prevents reload #1707
Comments
Nice find - you should create a pull request for this too. |
Hi @SamVanheer, this should be fixed in the current HL1/OpFor betas. |
yup, looks like it's working. |
still not working for some op4/bshift guns. |
Thanks @hobokenn. BS didn't get a beta update this round to reduce the number of test versions, it should be fixed when this fix is pushed to public. If you're seeing this in OpFor it probably has its own version of this bug, so I'll take a look at that. |
Fixed in the remaining titles. Will be in the next beta release. |
Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'. |
Closing as fixed. |
If you load a saved game where the active weapon has a partially empty clip, you cannot reload the weapon. Changing to another weapon and then back again, or picking up ammo fixes this.
To fix this bug in code, go to this line: https://github.com/ValveSoftware/halflife/blob/master/dlls/player.cpp#L3057
Add a call to TabulateAmmo right after this. It will resync ammo data and ensure it works correctly. Alternatively, update the weapons to use CBasePlayer::m_rgAmmo instead. Provided the client synchronizes them correctly, it should work just as well.
The text was updated successfully, but these errors were encountered: