Experimenting with DEHACKED. Particularly it's advanced Boom variant, BEX. I wanted to make a multiple-pellet shooting weapon. Like a pistol which fires, for example, three bullets at once (and yes, substracts 3 clip ammo for it). The code wasn't hard to put together, I just set FireCGun codepointers to the frames in pistol firing sequence (frames 14,15,16) and set the frame durations to 0.
Works perfectly in ZDoom based ports. But aiming for Boom compatibility, it isn't enough. Unfortunately, other ports seems to crash after the gun fires.
After some investigation, I realized the cause is most probably the weapon flash sequence. I removed it (set the pistol's muzzle-flash state to 0, like the fist has). Experienced only a little improvement. Now it worked in Edge and ZDaemon. Original Boom and MBF still crashes, as well as Odamex. PrBoom-plus, after the weapon was fired, displayed Cyberdemon's death sprite at the top left corner of the screen, and the sprite stayed there and even kept bobbing with the weapon, until I managed to switch to another weapon with muzzle-flash animation, which has overriden it.
I've tried other ways, such as various modifications of the flash state, adding frames with NULL or Light0 or other codepointers between the firing frames. Without success. Apparently the only way of solution I can think of is to change the frame durations to 1. But then the weapon is not behaving as I would like.
Is there any way how to achieve a weapon that fires multiple (even more than 3) times during a single tic, and compatible with Boom? I totally don't care how many frames from other things/weapons/monsters I would have to replace, only to make this one weapon working.