View Issue Details

IDProjectCategoryView StatusLast Update
0000386Gameplay + OpenGL[All Projects] Featurepublic2017-03-08 03:21
ReporterUltimate Freedoomer 
Assigned To 
Status closedResolutionnot fixable 
Summary0000386: Altering the reload code & ALTHUD to better handle more than 2 ammo types per weapon when a mod uses such.
DescriptionI've noticed that reloading is handled awkwardly when the weapon has more than 1 clip. Here's my suggestion: Reworking the code that handles the manual reload to better handle weapons that use more than 2 ammo types (like a dual-wield with separate magazines, or a shotgun that can swap between buckshot & dragon's breath). Basically, the reload code rework would use a combination of the assault rifle reload code from Marathon's source code file but adapted for partial-clip reloads (for when the gun uses multiple clips & multiple reserves directly, like when the alt-fire uses its own ammo & needs to be reloaded. This way, when the reload button is pressed, only the non-full clip is reloaded, & the reload of each fire mode's clip takes the appropriate amount of ammo points from both that clip & that reserve pool into account, as well as only taking from the relevant reserve) & an implementation of BioShock's reload system (for when the gun can toggle between ammo types. This way, when you reload the selected ammo's clip for that weapon, you ONLY reload that clip). Accompanying this reload rework would be an expanded "Weapon.AmmoType" flag (preferably with us, the modders, being able to do an unlimited amount of this flag on a weapon on the off-chance that it would be needed) to make the extra ammo types work with the ALTHUD.
Additional InformationThis is mostly so weapons that use more than 2 ammo types (including "quick-access" stuff, like grenades) work right with the ALTHUD.



Graf Zahl

Graf Zahl

2017-03-05 18:28

administrator   ~0000872

There are no weapons that "use more than two ammo types".
If they do it is not recorded anywhere the HUD could get it from.
Ultimate Freedoomer

Ultimate Freedoomer

2017-03-07 19:43

reporter   ~0000907

It is true that there are no vanilla weapons that do that. However, this would mostly be for mods. The issue I'm trying to suggest a fix for is that while SBARINFO huds can show more than 2 ammo types per weapon (the dual Uzis in Trailblazer being a good example of a mod using SBARINFO for such, since both magazines have separate ammo counters), the ALTHUD & the default full screen HUD can't.
Graf Zahl

Graf Zahl

2017-03-08 03:21

administrator   ~0000911

The HUD has to get the info from somewhere, and the Weapon class only has two ammo types, and large parts of the inventory system depend on weapons having two ammo types. This cannot 'just' be changed.

Issue History

Date Modified Username Field Change
2017-03-05 16:39 Ultimate Freedoomer New Issue
2017-03-05 16:39 Ultimate Freedoomer Tag Attached: DECORATE
2017-03-05 16:39 Ultimate Freedoomer Tag Attached: ZScript
2017-03-05 18:28 Graf Zahl Status new => closed
2017-03-05 18:28 Graf Zahl Resolution open => not fixable
2017-03-05 18:28 Graf Zahl Note Added: 0000872
2017-03-07 19:43 Ultimate Freedoomer Note Added: 0000907
2017-03-08 03:21 Graf Zahl Note Added: 0000911