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: Fix machine gun animation and musket #992

Merged
merged 1 commit into from
May 2, 2024

Conversation

DRuppFv
Copy link
Contributor

@DRuppFv DRuppFv commented Apr 28, 2024

The musket simply didn't call bullet_spawn_offset.y, no big deal.

The machine gun animation would get frozen when dropped. Had to add an "else" for when the item is not being held, because items_dropped.get is called only when in fact the item got dropped, and if the player gets killed while shooting, the animation would still froze, as it wouldn't be IN FACT dropped.

It even made me think about the ammunition reload system of all guns.

        if items_dropped.get(entity).is_some() {
            // reload gun
            gun.ammo = *max_ammo;
        }

Here, reloading will only take place if the item is dropped. This means that if you die holding a musket with half the ammo, the next player to pick it up will get it with half the ammo. Is that what we really want? Or do we want the ammo to be reloaded?

@MaxCWhitehead
Copy link
Collaborator

Good catch. I think we probably want the ammo to be reloaded when player dies and "drops" weapon so it is consistent with deliberately dropping.

@MaxCWhitehead MaxCWhitehead added this pull request to the merge queue May 2, 2024
Merged via the queue into fishfolk:main with commit cb8db89 May 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants