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 crash when attempting to throw items, fix interface for guns being thrown. #22009

Merged
merged 1 commit into from Sep 28, 2017

Conversation

Projects
None yet
2 participants
@DanmakuDan
Copy link
Contributor

commented Sep 27, 2017

Fixes #22001.

All items were expected to have a gun skill referenced when calculating time to aim and fire. This caused all thrown items that weren't guns to crash. After splitting the logic to check the throw time instead for thrown items, thrown guns were still showing different aim precisions despite there only being the basic aiming capability for thrown items. The thrown items now have separate logic to get only the basic aim type instead of trying to pull each precision aim type when a gun is being thrown.

1. Separate default aim_type object into a separate function for reuse.
2. Update Character::get_aim_types to use the separate default aim_type.
3. Add target_mode input to print_ranged_chance, since aiming
calculation will be different for firing guns and throwing them.
function.
4. Use only default aim_type in print_ranged_chance if an item is being
thrown.
5. Generalize the gun variable name to ranged_weapon.
6. Use throw move cost calculation when in throw mode.

@kevingranade kevingranade merged commit 2047f5a into CleverRaven:master Sep 28, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.05%) to 22.531%
Details
gorgon-ghprb Build finished.
Details
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.