Page MenuHomeFeedback Tracker

The scripting command 'reload' is broken
New, NormalPublic

Description

This 20-years-since-last-touched command is in need of fixin'..

It reloads the first muzzle it finds in currently held weapon that has ammo fired from it's magazine, not the currently selected muzzle even if it has empty mag.
It is further broken because if it reloads a different muzzle than the currently selected one the weapon will not play any of it's reload animations.

So the command is broken and useless for all multi-muzzle weapons.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Current dev (1.99.146398)

  1. play using for example the Promet SG 6.5mm with the shotgun (just to see the bug better, happens on any multi-muzzle weapon)
  2. fire couple of rounds with the rifle
  3. switch to shotgun and fire a couple rounds
  4. exec something like 0 = [] spawn {sleep 2; reload player} in the debug console
  5. observe rifle magazine being reloaded without weapon reload anims, shotgun stays unloaded
  1. play using the Promet SG 6.5mm with the shotgun
  2. fire couple of rounds with the rifle
  3. switch to shotgun and fire a couple of rounds
  4. switch back to rifle
  5. exec something like 0 = [] spawn {sleep 2; reload player} in the debug console
  6. observe rifle magazine being reloaded as it supposed to with weapon reload anims playing. Shotgun stays unloaded.
  1. play using the Promet SG 6.5mm with the shotgun
  2. switch to shotgun and fire a couple of rounds
  3. switch back to rifle
  4. exec something like 0 = [] spawn {sleep 2; reload player} in the debug console
  5. shotgun is reloaded without any weapon reload anims
  1. play using the Promet SG 6.5mm with the shotgun
  2. switch to shotgun and fire a couple of rounds
  3. exec something like 0 = [] spawn {sleep 2; reload player} in the debug console
  4. shotgun is reloaded with weapon reload anims
Additional Information

Suggestion
While fixing this would be grand if you could also add alternative syntax' for this (or a new command reloadMuzzle):
<gunner> reload <muzzle>
with alt syntax: <gunner> reload [<muzzle>, <magazine>]
Where obviously the <gunner> would be soldier holding/manning the weapon and <muzzle> would the muzzle of the currently used weapon.
So that one could point the reload directly to wanted muzzle.
And alt syntax the same but you could also define the magazine class to reload with, obviously only if given mag is in gunners/vehicles inventory.

Event Timeline

h- created this task.Fri, May 22, 9:20 PM