source-sdk-2013
source-sdk-2013 copied to clipboard
HL2 RPG causing an assert [Fix included inside]
Vanilla code nothing changed, getting an assert in c_te_legacytempents.cpp on line 1871.
Steps to reproduce:
- Give yourself an rpg (give weapon_rpg)
- Point and shoot some where
I'm really new to GitHub (and c++ coding in general) so I'm not exactly sure how to submit the fix but looking at 2007 branches code it looked like previously there was a known issue with weapons that didn't have a muzzleflash, namely the rpg. The fix was to just swap out the new code in CtempEnts::MuzzleFlash with the old one that instead of throwing out an assert for undefined muzzleflashes like type 0 for the RPG use the smg's (most likely because the view model size would hide it).
Copy of the code snippet: http://pastebin.com/DRCChD5c