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

Loading a saved game where the active weapon has partially empty clip prevents reload #1707

Closed
SamVanheer opened this issue Jun 15, 2016 · 8 comments
Assignees

Comments

@SamVanheer
Copy link

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.

@tschumann
Copy link

Nice find - you should create a pull request for this too.

@mikela-valve
Copy link
Member

Hi @SamVanheer, this should be fixed in the current HL1/OpFor betas.

@SamVanheer
Copy link
Author

yup, looks like it's working.

@hobokenn
Copy link

hobokenn commented May 1, 2019

still not working for some op4/bshift guns.
op4: revolver, deagle, smg, crossbow, sniper rifle.
bs: glock, revolver, smg, crossbow.

@mikela-valve
Copy link
Member

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.

@mikela-valve mikela-valve reopened this May 1, 2019
@mikela-valve
Copy link
Member

Fixed in the remaining titles. Will be in the next beta release.

@mikela-valve
Copy link
Member

mikela-valve commented May 21, 2019

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

@mikela-valve
Copy link
Member

Closing as fixed.

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

No branches or pull requests

5 participants