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

Ammo Drop from reserve now tries to drop a full box, instead of, at most, a full clip #1694

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

MrXonte
Copy link
Contributor

@MrXonte MrXonte commented Dec 9, 2024

Ammo dropping from the reserve was a bit weird. You currently drop Min(Clipsize, Reserve), which is fine for default weapons where clip size = box ammo, but for any custom weapon with less ammo, things get increasingly weird.
The worst-case scenario involves weapons with super-low ammo. Consider the often-used pocket rifle, which has only a clip size of 1; here, you must drop ammo 10 times to drop the same as a regular 357 box.
My change makes it so that instead, you now drop Min(Box Size, Reserve), which feels much better and has no downsides I can see. Dropping from the clip remains unchanged as it should.

changed ammo dropped to drop full box if possible instead of clip. Fixes weird scenarios with weapons that have low clipsize where you need to spam ammo drop to drop the equivalent of a full box of ammo.
added myself to changes
Copy link
Member

@TimGoll TimGoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is a good change, well done

@Histalek Histalek merged commit c60ac9d into TTT-2:master Dec 9, 2024
4 checks passed
Histalek pushed a commit that referenced this pull request Dec 10, 2024
…ost, a full clip (#1694)

Ammo dropping from the reserve was a bit weird. You currently drop
`Min(Clipsize, Reserve)`, which is fine for default weapons where clip
size = box ammo, but for any custom weapon with less ammo, things get
increasingly weird.
The worst-case scenario involves weapons with super-low ammo. Consider
the often-used pocket rifle, which has only a clip size of 1; here, you
must drop ammo 10 times to drop the same as a regular 357 box.
My change makes it so that instead, you now drop `Min(Box Size,
Reserve)`, which feels much better and has no downsides I can see.
Dropping from the clip remains unchanged as it should.
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.

3 participants