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

Overhaul of RELOAD_AND_SHOOT weapons? #72359

Closed
osuphobia opened this issue Mar 13, 2024 · 1 comment
Closed

Overhaul of RELOAD_AND_SHOOT weapons? #72359

osuphobia opened this issue Mar 13, 2024 · 1 comment
Labels
<Suggestion / Discussion> Talk it out before implementing

Comments

@osuphobia
Copy link
Contributor

Is your feature request related to a problem? Please describe.

RAS weapons bugged for years, making it an annoyance using bows and slingshots, especially when compared to guns and crossbows without this FLAG.

RAS weapons waste moves in a particular way. Ammos are not kept in the "magzine" of RAS weapons, every time you try to shoot by entering fire menu, you load an ammo first. If you change your mind and quit the menu, you unload your weapon, keeping it empty as intended.
The problem is, the moves of taking ammo out and reloading your RAS weapon is cost even if you quit the menu immediately. What's worse, RAS weapons do not display the move cost of loading them with ammo in the fire menu, thus it can lead to unwilling situations.
Furthermore, an improvement was made to aim UI, allowing auto re-entering of aim UI immediately after firing, and due to the bug above, RAS weapons have been forbidden to do so by a workaround in activity_actor.cpp.

    if( weapon && weapon->gun_current_mode()->has_flag( flag_RELOAD_AND_SHOOT ) ) {
        // RAS weapons are currently bugged, this is a workaround so bug impact
        // isn't amplified, once #54997 and #50571 are fixed this can be removed.
        restore_view();
        return;
    }

BTW, there is a condition that the move cost of taking ammo out of your pockect and loading it will be refunded. If you aim at adjacent tile and press ., since that you can not make your aim steadier, you simply wait for 1 turn. At this point, quiting fire menu costs 0 point. All points are refunded and treated as if the ammo was never loaded in the first place.

Solution you would like.

After further investigation, I found out that all that issues were solved perfectly in CBN.

cataclysmbnteam/Cataclysm-BN#1660
cataclysmbnteam/Cataclysm-BN#1815
cataclysmbnteam/Cataclysm-BN#1857
cataclysmbnteam/Cataclysm-BN#2468

In CBN, if you quit the fire menu without shooting, the move cost of taking ammo out of your pockect and loading it will be refunded. The actual move cost, including those of taking ammo out of your pockect and loading it, is displayed in aimming UI. Moves are not cost unless you actually fire your RAS weapon.
There are other improvements to ranged weapon system also.

Can we port over and update those codes?

Describe alternatives you have considered.

I came up with a workaround, making it possible to store an arrow on a bow's drawstring, using NO_UNLOAD FLAG and use_action transform. There's no need to do this if we can totally solve the issues.

Additional context

No response

@osuphobia osuphobia added the <Suggestion / Discussion> Talk it out before implementing label Mar 13, 2024
@RenechCDDA
Copy link
Member

RenechCDDA commented Mar 13, 2024

Duplicate of #71819

If you want to help solve existent bugs, please do. But posting an omnibus issue with 'suggestions'(that bugs are fixed) is not going to help. Your real suggestion regarding loading/unloading is a duplicate of the above mentioned issue, so I've closed this one.

@RenechCDDA RenechCDDA marked this as a duplicate of #71819 Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

2 participants