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

Players aren't given exhaustible weapons when they get the ammo for them #153

Closed
SamVanheer opened this issue Jul 20, 2022 · 8 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@SamVanheer
Copy link
Collaborator

No description provided.

@Ronin4862
Copy link

The ammo still doesn't add up correctly.

https://youtu.be/jANdpHryqKU

In this case only the 5 satchels add up but not the 5 trip mines. It's an improvement though; before this none of these would have added up because neither were in my inventory.

@SamVanheer
Copy link
Collaborator Author

It's working fine on my end. Make sure you're using an unmodified codebase and do a full rebuild.

@SamVanheer
Copy link
Collaborator Author

Nevermind, i was able to reproduce it. You have to use up your tripmines first and then pick up more.

@SamVanheer SamVanheer reopened this Jul 21, 2022
@Ronin4862
Copy link

Nevermind, i was able to reproduce it. You have to use up your tripmines first and then pick up more.

Yes. In the video I used up the satchels and trip mines intentionally before picking up that ammo cache. The previous algorithm only added them up IF you had atleast one of each type (grenades, satchels, mines).

@SamVanheer
Copy link
Collaborator Author

I'm going to have to do some refactoring to fix this properly. The weapons code is a real mess, and it makes this pretty complicated.

@Ronin4862
Copy link

I'm going to have to do some refactoring to fix this properly. The weapons code is a real mess, and it makes this pretty complicated.

No rush Sam! Tomorrow is another day.
Don't know what hour is in Belgium, but you should probably go to sleep now :)

@SamVanheer
Copy link
Collaborator Author

I've reworked the weapons code to make sure that this works properly.

@Ronin4862
Copy link

Great job Sam!

Works great and I've tested every weapon to make sure no side bugs appeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants