source-sdk-2013 icon indicating copy to clipboard operation
source-sdk-2013 copied to clipboard

HL2 RPG causing an assert [Fix included inside]

Open Wazanator opened this issue 11 years ago • 1 comments

Vanilla code nothing changed, getting an assert in c_te_legacytempents.cpp on line 1871.

Steps to reproduce:

  1. Give yourself an rpg (give weapon_rpg)
  2. 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

Wazanator avatar Aug 31 '13 22:08 Wazanator