toadie2k / NIArms

45 stars 44 forks source link

GL variant weapons lose large capacity magazines upon launcher reload #94

Closed s4098055 closed 6 years ago

s4098055 commented 6 years ago

G'day all,

Weapons with grenade launchers (GL), when loaded with higher-capacity magazines, are reverting to smaller magazine sizes when the GL is reloaded.

If the player has lower-capacity magazines available, the current higher-capacity magazine will be lost (i.e. not returned to the inventory) and a smaller one inserted.

If the player only has high-capacity magazines available, the current magazine will be lost and another inserted into the weapon (note that the weapon model still reverts to the small-capacity magazine model, however). In addition, subsequent magazine reloads will not cause the model to change back to the large-capacity variant, unless the player loads a small magazine, then a large one again (or a different type of large magazine).

If the player only has one magazine left, the weapon will be empty when the GL is reloaded (unless the weapon model is in the above state - large-capacity magazine loaded, but not visible).

I note the above is confusing as shit, I'm just trying to list all observed outcomes. Let me know if further clarification is needed.

An example for reproduction - jump into the arsenal, give yourself a Colt M4 Carbine (GL), some regular magazines and some X-15s. Go nuts.

I've seen this occur with weapons from the AK, AR15 and G36 pack insofar. I'd probably assume it's going to affect all NIArms weapons w. GLs covered by the magazine-swap framework.

toadie2k commented 6 years ago

Yeah, can confirm still an issue in current build- @robalo ?

robalo commented 6 years ago

Multi muzzle case is tricky. I think for a workaround we can add condition to bail when muzzle does not match weapon, after: params ["_unit", "_weapon", "_muzzle", "_newmag", ["_oldmag", ["","","",""]]]; if (_weapon != _muzzle) exitWith {}; Can't test this, should work though.

toadie2k commented 6 years ago

I'll run it through a build and report findings.

toadie2k commented 6 years ago

Update: yep, 100% solves it. might be a problem if ever there needed to be a multi-muzzle solution, but I'm fairly confident that's a while off.