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
Rocks multiplying #40978
Comments
I can reproduce the issue using your attached save game - either by dropping 1 rock and picking it up (I get 2 back), or by killing a zombie and getting the rocks back from their corpse (I picked up 3 and got 6 back). I couldn't determine steps to make it happen in a new game world. |
@KorGgenT what is the intention of this code? https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/character.cpp#L2309
Is it supposed to return the item that was added to a pocket? Or just the last item in the pocket? It calls restack() inside add(), thus, it can return a totally different item than the one we were adding. In my case |
Not sure #41042 fixed the problem. I keep picking up two arrows instead of one when collecting my fired arrows from the ground. Also interesting, the MP5 was always just sitting in my inventory without being used but the log says I'm picking the MP5 up. (What I'm really picking up are arrows though). Used version: 0.E-2947-g8c946f2 (tiles), should be build number 10736 |
I tested with provided save just now, shot about 30+ rocks, picked them up and the total number of rocks where 46 - same as I started with. So that seems fixed, unless the bug is more rare. Can you upload your own save? It might be specific to your pocket configuration that your character is wearing. |
Just made a completely new world with only default mods. I spawned in a short bow and some makeshift wooden arrows as well as the H&K MP5A2 with an extended magazine and finally a daypack. I spawned in exactly 50 makeshift wooden arrows. After shooting a bit at the ground and 2 zombie dogs, I ended up with: 49 + 5 makeshift wooden arrow and 1 wooden broadhead arrow. Not only did the game produce arrows out of thin air, it even produced one of a different kind... World save attached. |
I have killed 6 more zombie dogs and could not replicate this. I ended up with 1 less arrow that I started with. Are you sure you have compiled latest code? I.e. git pull on master branch. |
I'm not compiling the code myself, I use the CDDA Launcher which, as far as I know, pulls the binaries from the releases section of this github. In this case this one: https://github.com/CleverRaven/Cataclysm-DDA/releases/tag/cdda-jenkins-b10736 |
The last commit of that build was at 2020-06-07 20:48:03. |
You're right my bad, I saw that the fix was 6 days old and merged, thus I wrongly assumed the latest release (from that time) had the fix in it. |
Comments above indicate this was fixed. |
Describe the bug
The rocks i'm using as ammo for my sling are multiplying. Every rock i pick up count as two on my inventory.
Steps To Reproduce
I couldn't reproduce it, i started a new world, spawned some rocks and a sling, but it worked just fine.
Expected behavior
Every rock i pick should give me one.
Screenshots
Versions and configuration
Dark Days Ahead [dda],
Stats Through Kills [stats_through_kills],
Magiclysm [magiclysm]
]
-->
Additional context
Here is the save
save.zip
The text was updated successfully, but these errors were encountered: