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

Eriguns1: EriSuperShotgun (Standard) - no auto-switch on 1 shell #37

Open
mmaulwurff opened this issue Jan 30, 2018 · 1 comment
Open
Labels

Comments

@mmaulwurff
Copy link
Contributor

Steps to reproduce:

  1. Have only 3 shells remaining.
  2. Shoot EriSuperShotgun.
  3. Now you have 1 shell remaining.
  4. At this moment SSG should be automatically switched to another weapon, but this doesn't happen.
  5. If you try to shoot again, SSG is lowered and then raised again. So no auto-switch happens at all.

This is not very convenient in a fight, when you have to manually select another weapon quickly.

I tried to fix this by adding
Weapon.MinSelectionAmmo1 2;
to EriSuperShotgun class in weapons/supershotgun.txt, and it indeed fixes auto-switching for standard EriSSG. But Extended SSG now is auto-switched too when only 1 shell remains because of SSG inheritance. This is not good because Extended SSG is still usable at this point and should not be auto-switched away.
Then I tried to fix Extended SSG by adding MinSelectionAmmo1 and/or MinSelectionAmmo2 to AltSuperShotgun. But this somehow negates MinSelectionAmmo1 effect in Standard SSG.

At this point I don't know how to resolve this issue and not break both SSGs. Maybe breaking inheritance between EriSuperShotgun and AltSuperShotgun will help, but this will change mod structure and cause code duplication, and I don't want to do any of this two things unless there is no another way.

@XaserAcheron
Copy link
Owner

There's some magic ZScript things that can be done to remedy this one way or another. I'll have to tinker a bit.

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants