Jump to content
Sign in to follow this  
N.o.R.S.u

How to get rid of the muzzle flash bug...

Recommended Posts

The famous muzzle flash bug is easy to fix, though you must have OFP: Resistance to do it. Here's how it goes:

1. DePBO your favourite muzzle flash bug weapon addon

2. open the config.cpp with notepad

3. put these lines to it

class CfgModels

{

class Default{};

class Weapon: Default{};

class name-of-the-weapon-model: Weapon{};

};

name-of-the-weapon-model is the name of the p3d-file that came with the addon, so it must be exact! So if you have p3d which name is AKS74.p3d the new line in the config looks like this:

class CfgModels

{

class Default{};

class Weapon: Default{};

class AKS74: Weapon{};

};

4. After the config.cpp is modified StuffPBO the addon again

5. Place the new *.pbo into OperationFlashpoint\Res\AddOns -folder

Note that there can't be any symbols in the p3d-name, so if the p3d is like AK101+grenades.p3d the command won't work (at least for me).

Hope this helps.

Share this post


Link to post
Share on other sites

that should only work together with Resistance, in OFP it ctd if you put those lines in.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Rastavovich @ July 22 2002,09:42)</td></tr><tr><td id="QUOTE">that should only work together with Resistance, in OFP it ctd if you put those lines in.<span id='postcolor'>

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (N.o.R.S.u @ July 22 2002,09:15)</td></tr><tr><td id="QUOTE">The famous muzzle flash bug is easy to fix, though you must have OFP: Resistance to do it. Here's how it goes:<span id='postcolor'>

Share this post


Link to post
Share on other sites

Excuse me gentelmen, but i got a problem.

When i mend a .CPP with no

class CfgModels

Line at all, no problem, works fine and the muzzle flash dissapear.

but...

When i try it with an addon wich already has some kind of

class CfgModels

parameters, the whole thing crass and OFP wont start.

I know that is all up the format use (the braquets or something similar{}) but i dont know how to use it properly.

Other troublematic issue is when in the same PBO, CPP there are references to more than one P3D (fliper's m4 pack for example)

I will be gratefull if you could help me on solve this issue

Share this post


Link to post
Share on other sites

Hmm for Fliper's M4A1 addon you have to put something like this in the config:

class CfgModels

{

class Default{};

class Weapon: Default{};

class FLP_M4A1_2X_proxy: Weapon{};

class FLP_M4A1_CMag_proxy: Weapon{};

class FLP_M4A1_proxy: Weapon{};

class FLP_M4A1_SD_2X_proxy: Weapon{};

class FLP_M4A1_SD_CMag_proxy: Weapon{};

class FLP_M4A1_SD_proxy: Weapon{};

};

Note that Fliper's M4A1 with M203 grenade launcher added to that list won't work because the p3d-names for those are like this one: FLP_M4A1+M203_proxy.p3d. And like I said before, p3d-names with symbols like + will cause the config to crash. confused.gif So Fliper should change those p3d-names for his next version.

Share this post


Link to post
Share on other sites

I've got a question:

If I want to modify an addon to work with resistance, and I can't get a hold of the creator, is it still OK to distribute the mofidied addon without his permission? I wouldn't claim it as my own, and I would leave the original readme.txt with it. Does anyone think this would be a problem/unethical?

Share this post


Link to post
Share on other sites

I don't think so. If you just release the fixed addon (without any changes to config except the cfgmodels) with its default readme and with all files that came in the original zip (like jpgs and so) then there shouldn't be any problems. I've now fixed all UceE's unit addons to work correctly with pistols and I'm thinking to release them again.

I think it's OK as long as you don't take any credit of the addon for yourself wink.gif.

Share this post


Link to post
Share on other sites

the author should be an arse to not axxept that is work is redone and better (or ll he want to stay within all the bug it got.. he deserve the name of author if so).

But if u modify an addon be sure to respect his work (so dont add new feature)

Share this post


Link to post
Share on other sites

well if you do re-release modified weapons you should put a little r  in the pbo name to avoid confusion.  

Norsu, I have converted almost all of my older weapon add-ons but a few still refuse to work.  here is an example of one that i modified that still wont work:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot 0// dummy weapons

#define WeaponSlotPrimary 1// primary weapons

#define WeaponSlotSecondary 16// secondary weapons

#define WeaponSlotItem 256// items

#define WeaponSlotBinocular 4096// binocular

#define WeaponHardMounted 65536

class CfgModels

{

class Default{};

class Weapon: Default{};

class dsg3: Weapon{};

class dsg3s: Weapon{};

};

class CfgPatches

{

class G3 {units[] = {G3}; weapons[] = {}; requiredVersion = 1.30; };

class G3S {units[] = {G3S}; weapons[] = {}; requiredVersion = 1.30; };

class SoldierG3S {units[] = {SoldierG3S}; weapons[] = {}; requiredVersion = 1.30; };

class SoldierG3         {units[] = {SoldierG3};        weapons[] = {}; requiredVersion = 1.30; };

};

class CfgAmmo

{

class default {};

class BulletSingle : default{};

class BulletBurst: BulletSingle{};

class BulletFullAuto: BulletBurst{};

class BulletSingleW: BulletSingle{};

class BulletBurstW: BulletBurst{};

class BulletFullAutoW: BulletFullAuto{};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class M16: Riffle {};

//-----------------------------------------------

class G3: Riffle

//-----------------------------------------------

{

  scopeWeapon=2;

  scopeMagazine=2;

  model="\ds_g3\dsg3s";

  modelOptics="\data3d\optika_m16";

picture="\ds_g3\w_g3.paa";

  displayName="G3";

  displayNameMagazine="G3Mag";

  shortNameMagazine="G3";

  drySound[]={"\ds_g3\G3dry.wav",0.010000,1};

reloadMagazineSound[]={"\ds_g3\G3reload.wav",0.2,1};

  optics=1;

  opticsZoomMin=0.300000;

  opticsZoomMax=0.300000;

  distanceZoomMin=150;

  distanceZoomMax=150;

  count=20;

  maxLeadSpeed=50;

  initSpeed=400;

  magazines[]={"G3mag"};

  modes[]={"Single","FullAuto"};

  class Single

  {

     ammo="BulletSingleW";

     multiplier=1;

     burst=1;

     displayName="G3 Single";

     dispersion=0.002000;

sound[]={"\ds_g3\g3.wav",1,1};

     soundContinuous=0;

     reloadTime=0.150000;

     recoil="rifflesingle";

     ffCount=1;

     autoFire=0;

     aiRateOfFire=5.000000;

     aiRateOfFireDistance=500;

     useAction=0;

     useActionTitle="";

  };

  class FullAuto

  {

     ammo="BulletFullAuto";

     multiplier=1;

     burst=1;

     displayName="G3 Auto";

     dispersion=0.004000;

sound[]={"\ds_g3\g3.wav",1,1};

     soundContinuous=0;

     reloadTime=0.100000;

     ffCount=1;

     recoil="riffleBurst3";

     autoFire=1;

     aiRateOfFire=5.000000;

     aiRateOfFireDistance=500;

     useAction=0;

     useActionTitle="";

  };

};

//-----------------------------------------------

class G3S: G3

//-----------------------------------------------

{

  scopeWeapon=2;

  scopeMagazine=0;

  model="\ds_g3\dsg3";

  modelOptics="\ds_g3\g3_optika";

picture="\ds_g3\w_g3s.pac";

  optics=1;

  opticsZoomMin=0.300000;

  opticsZoomMax=0.300000;

  distanceZoomMin=150;

  distanceZoomMax=150;

  displayName=" G3S";

  magazines[]={"G3mag"};

};

//-----------------------------------------------

class G3mag:  G3

{

scopeWeapon=0;

scopeMagazine=2;

displayNameMagazine="G3mag";

shortNameMagazine="G3mag";

picture="\ds_g3\m_g3.paa";

};

//----------------------------------------------------------

};

class CfgVehicles

{

class All{};

class AllVehicles : All{};

class Land : AllVehicles{};

class Man : Land{};

class Soldier : Man{};

class SoldierWB : Soldier{};

class SoldierG3S: SoldierWB

{

displayName="US Soldier G3S";

weapons[]={"Throw","Put","G3S","Binocular","NVGoggles&a

mp;q

uot;};

magazines[]={"G3mag","G3mag","G3mag","G3mag","G3mag"

,"HandGrenade","HandGrenade","SmokeShell","SmokeShell&a

mp;q

uot;};

};

class SoldierG3: SoldierWB

{

displayName="US Soldier G3";

weapons[]={"Throw","Put","G3","NVGoggles"};

magazines[]={"G3mag","G3mag","G3mag","G3mag","G3mag"

,"G3mag","HandGrenade","HandGrenade","HandGrenade"

};

};

};

};<span id='postcolor'>

this add-on does contain an optika P3D, which may through it off.  when i try to launch with this in my folder i get a CTD.  any ideas??

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">class G3 {units[] = {G3}; weapons[] = {}; requiredVersion = 1.30; }; class G3S {units[] = {G3S}; weapons[] = {}; requiredVersion = 1.30; };<span id='postcolor'>

Well as far as I know there's a problem in that line. It should be like this:

class G3 {units[] = {}; weapons[] = {G3}; requiredVersion = 1.30; }; class G3S {units[] = {}; weapons[G3S] = {}; requiredVersion = 1.30; };

G3 and G3S are both weapons so they can't be in "units" section wink.gif.

Share this post


Link to post
Share on other sites

Where do you put the code, which part of the Config.cpp?

Share this post


Link to post
Share on other sites

Between the class CfgPatches and class cfgWeapons.

I've got a question: why do some addon guns work with 1.46 and 1.75 (Resistance) without the muzzle flash bug. For example, GFX707s MG42...?

Share this post


Link to post
Share on other sites

Hmm that's a good question, did you use GFX's old MG42 ,which doesn't have muzzle flash, or his new version which has proper working muzzle flash?

Share this post


Link to post
Share on other sites

That might be it...maybe I downloaded a new version...but I'm sure I saw this with other adddons.

I had a lot of addon guns installed in OFP when I added Resistance, and they all worked; and I noticed when I installed Resistance a few still worked without the flash bug, but I can't remember which ones...

Share this post


Link to post
Share on other sites

well norsu, the only part i modified was the muzzleflash fix. and it seemed to work fine before i modified it. but ohh well i guess i will just have to wait for Vipersheart to update the HKG3(since it has the muzzle flash and it conflicts with the OFP:R G3[same editor name]). anybody else know of a working 1.75 HKG3 with normal butt?

as far as fubar's question I had about every add-on known to man and the only ones that worked when i installed resistance were the ones that were only reskins (not new or edited models)

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"> I noticed when I installed Resistance a few still worked without the flash bug, but I can't remember which ones...<span id='postcolor'>

Maybe they were old HK packs from Lost Brothers mod which used MP5-model from OFP demo. MP5 in demo didn't have muzzle flash at all.

Share this post


Link to post
Share on other sites

I haven't tried including the muzzle flash fix in too many addons, but the ones I have investigated already had these lines of code in them, which perplexes me to no end...

Especially the SNS M249 SAW addon, which is presently my favourite version of said weapon... and one which I wish to alter slightly for use as a C9 Light Machine Gun for my canadian armed forces addon.

has anyone else fixed the SNS SAW muzzle yet, or know of any superior non-muzzle-flashing M249's or FN Minimi's that are available?

Share this post


Link to post
Share on other sites

SNS version is the best I've seen so far...before I did my reinstall I fixed the muzzle-flash on it, no probs.

Just replace everything under class CfgModels with this:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgModels

{

class Default{};

class Weapon: Default{};

class SNSSAWP3D: Weapon{};

};

<span id='postcolor'>

imagewiz54116.jpg

Share this post


Link to post
Share on other sites

I dont get the snssawp3d thing, but after I dropped my pride and included it instead of dropping the p3d, it worked... now I just get some ammoboxsomethingsomething.paa is missing... but it works! hee hee.

Thank you muchly. Now my canuck soldiers can use army issue C9's instead of hockey sticks tounge.gif

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Major Fubar @ Aug. 22 2002,09:53)</td></tr><tr><td id="QUOTE">SNS version is the best I've seen so far...before I did my reinstall I fixed the muzzle-flash on it, no probs.

Just replace everything under class CfgModels with this:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgModels

{

class Default{};

class Weapon: Default{};

class SNSSAWP3D: Weapon{};

};

<span id='postcolor'><span id='postcolor'>

doesnt work, im probably doing something wrong here but this is the error i get: 'snssaw\config.cpp.':'{'encounterd instead of '='

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×