Hey everyone!!
;D
I am so happy today. I have finally found a way to fix the muzzle flash bug. It has taken me about three months of digging around and a little forum posting but now I finally have the solution(this is the solution that still produces a muzzle flash instead of just deleting it.)
The first step of course is to obtain an addon that possesses the muzzle flash bug(it was introduced in v1.46 of OFP)
The second step is to download Amalfi's PBO maker and PBO decryptor from here:
http://www.ofpec.com/editors/browse.php?browsewhat=3&category=3_2 This is a life saver for the job we have to do.(Thanks Amalfi!!)
Then after you do that, I need to tell you what the problem is that is causing the muzzle flash bug. There is a missing class in our CPPs, which is the problem we need to correct.
The first thing we need to do is get the config.cpp file by itself so we can edit it properly. This is what the PBO decryptor is used for. Once you have downloaded it, open it and then select the PBO file that you need to change(the PBO file contains the config.cpp file and other things, but we are only changing the config file.) It will then create a folder with the same name as the addon folder in the addon folder, but when you go into it, you will find the config.cpp file, which is what we need to edit.
After you have opened the file, this is the missing class that you need to put in:
class CfgModels
{
class Default
{
sections[]={};
sectionsInherit="";
};
class Weapon: Default
{
sections[]={"zasleh"};
};
class (put weapon name here, no parentheses): Weapon{};
};
MAKE SURE YOU SAVE THE CHANGES YOU MADE!!!
You should put this right after the last #define and before the class CfgPatches(make sure there is a blank line before you start typing class CfgModels and after the last }; ).
Then after you have typed in the missing class, it is time to put it back together. Open up the PBO maker and select the folder that contains the changed config.cpp file. But before you do this, I must warn you: It overwrites the old PBO file. I don't know why you would want the old one, but just so that you know. Then select the Make PBO button and you have a fixed and bug free PBO file. :wow:
Just place the new PBO file in your addons directory or wherever you are supposed to put it, it varies with certain addons. Then start up the game and kill some people with you new muzzle flash free gun :gunman: :joystick:
I would like to thank Amalfi for his tools, they are invaluable. And I would also like to thank VTX for his help as well.
If you have any questions or comments, please post them and I will respond. I just don't want everyone else to have the same frustrations I had trying to fix this bug.
I posted this on the forums because I think more people will look here than in the tutorials section.
Well, Enjoy! :toocool: