Skip to content

fix: Fix machine gun animation and musket#992

Merged
MaxCWhitehead merged 1 commit intofishfolk:mainfrom
DRuppFv:general_gun_fix
May 2, 2024
Merged

fix: Fix machine gun animation and musket#992
MaxCWhitehead merged 1 commit intofishfolk:mainfrom
DRuppFv:general_gun_fix

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
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