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

reloading firearms throws error and duplicates magazines #17869

Closed
Coolthulhu opened this issue Jul 31, 2016 · 7 comments

Comments

Projects
None yet
3 participants
@Coolthulhu
Copy link
Contributor

commented Jul 31, 2016

http://smf.cataclysmdda.com/index.php?topic=13028

I can (U)nload firearms without problems, and (r)eload empty ones. I can un- and reload magazines with bullets. I can reload a firearm with an empty magazine with bullets.
But when I (r)eload a firearm that contains a magazine with another magazine (whether from inventory or an ammo pouch), an error occurs:
DEBUG: item location does not point to valid item
FUNCTION: void item_location::remove_item()
FILE: src/item_location.cpp
LINE: 546

when I continue, the magazine is added to inventory, but a copy is still in the weapon. Unloading the weapon afterwards results in the duped magazine (filled like the original to-be-unloaded ode) added to inventory and a third (empty) remaining in the gun. Once the empty mag is unloaded, the gun is finally empty...

Marking as priority because reloading is pretty vital.

@Lord-Helmchen

This comment has been minimized.

Copy link

commented Jul 31, 2016

steps to reproduce here: #16445

@Coolthulhu

This comment has been minimized.

Copy link
Contributor Author

commented Jul 31, 2016

Closing as duplicate then.

@Coolthulhu Coolthulhu closed this Jul 31, 2016

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

Is this a recent regression or an older problem?

@Lord-Helmchen

This comment has been minimized.

Copy link

commented Jul 31, 2016

For me, it worked fine a few versions back. don't know when exactly I made the previous update. a few versions before the turret reloading was merged. 2302 5302, iirc.

@mugling mugling reopened this Jul 31, 2016

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

It's a different bug

@mugling mugling self-assigned this Jul 31, 2016

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

Have identified cause

@Lord-Helmchen

This comment has been minimized.

Copy link

commented Aug 4, 2016

fyi, looks fixed in my game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.