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

Fix NPC reload #15582

Merged
merged 4 commits into from Feb 28, 2016

Conversation

Projects
None yet
3 participants
@Coolthulhu
Copy link
Contributor

commented Feb 27, 2016

Allows NPCs to reload items with magazines and with charges.

Closes #15397
Closes #15508

Doesn't let them reload magazines yet.

EDIT: Removed a badly handled default argument in item::reload - the qty argument has to be strictly positive, while the default argument was -1.


if( !weapon.reload( *this, std::move( ammo[0] ) ) ) {

This comment has been minimized.

Copy link
@mugling

mugling Feb 27, 2016

Contributor

This was the only usage of the default argument for qty?

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Feb 27, 2016

Author Contributor

I think so. After I removed the default argument, I didn't need to change anything else.

This comment has been minimized.

Copy link
@mugling

mugling Feb 27, 2016

Contributor

With the exception of the unit tests (which could do with reworking in any case)

@kevingranade kevingranade merged commit ad7569c into CleverRaven:master Feb 28, 2016

1 check failed

default
Details

@Coolthulhu Coolthulhu deleted the cataclysmbnteam:npc-reload branch May 13, 2016

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.