Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upUnloading magazines (especially belts) can lead to player move starvation for a long time. #23440
Comments
kevingranade
added
<Bug>
Good First Issue
(S2 - Confirmed)
Magazines
[C++]
labels
Apr 10, 2018
This comment has been minimized.
This comment has been minimized.
|
Fix should be straightforward, take the code starting at https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/game.cpp#L10413 and move it to a new activity handler, which will incrementally unload the target magazine or gun without letting player::moves go far into negatives. There's also an opportunity to resolve #18489 by preventing the player from dropping the magazine while unloading it. (probably just a matter of making sure the casings and ammunition are dropped instead of the magizine or gun) |
kevingranade
added this to the 0.D milestone
Aug 17, 2018
kevingranade
added this to Easy Issues
in 0.D Release
Aug 17, 2018
kevingranade
moved this from Easy Issues
to Less hard issues
in 0.D Release
Aug 21, 2018
kevingranade
moved this from Less hard issues
to Fix Proposed
in 0.D Release
Sep 26, 2018
This was referenced Nov 27, 2018
This comment has been minimized.
This comment has been minimized.
|
The code referenced in Kevin's comment seems to have moved since... wow. April. For those who want to take a crack at this, the code he's referring to is now a couple hundred lines up the file, here: |
kevingranade commentedApr 10, 2018
Expected behavior
Unloading an ammunition belt can be interrupted by '.' or safe mode.
Actual behavior
Unloading an ammunition belt is uninterruptable and can allow a monster to kill you while performing it.
Steps to reproduce the behavior
Stand near the corner of a building.
Spawn a full (hundreds of rounds) ammunition belt.
Spwn a hostile monster nearby.
Run around the corner of the building, breaking sight with the monster.
Turn on safe mode.
'U'nload the ammunition belt.
Monster will round the corner and attack a large number of times before the layer has an opportunity to act.
Thnaks to vipchess for reporting: https://discourse.cataclysmdda.org/t/is-there-something-wrong-about-the-ammo-belt/15257