Removing the Muzzleflash?

How might I remove the muzzleflash on a CS:S model, without fooling around with models and materials? I’ve tried simply doing self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ), but to no avail.


I’m afraid the muzzleflash is coded into the viewmodel’s ACT_VM_PRIMARYATTACK activity. Fortunately, removing it won’t be too painful - you have two options here.

First, you could open the .mdl with a hex editor, try to find the line that calls for a muzzle flash, and remove it. This is like playing minesweeper while blind, and chances are you’d break the model. If you do succeed, however, it’s much cleaner than the alternative.

Your second option is to decompile the viewmodel, remove the muzzle flash line from the .qc, (it’s an event declared in the attack sequence) and recompile it. It would take a few seconds for someone experienced with using studiomdl, but might be confusing for anyone who’s never compiled a model. Note that this method might also screw up the viewmodel’s rotation, which is also easily fixable in the .qc.

Thing is, I need to have it so other people can use it…
…would it help to just pack in a custom model to do all that on?

Oh, sure. Because the effects are declared in the model, sending the non-muzzleflashing viewmodel to clients will make them not see its muzzleflash, either. You’d just recompile it as a separate .mdl and replace the one you’re currently working with. If you do the process properly, everything else should be identical to the original model.

Could you please rephrase that?

Would it work if I just made a custom model without a muzzleflash?