Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-----------------------------------------------------------------------------
- // Purpose: Play muzzle flash
- // Input : *pos1 -
- // type -
- //-----------------------------------------------------------------------------
- void CTempEnts::MuzzleFlash( const Vector& pos1, const QAngle& angles, int type, ClientEntityHandle_t hEntity, bool firstPerson )
- {
- #ifdef CSTRIKE_DLL
- return;
- #else
- //NOTENOTE: This function is becoming obsolete as the muzzles are moved over to being local to attachments
- switch ( type )
- {
- //
- // Shotgun
- //
- case MUZZLEFLASH_SHOTGUN:
- if ( firstPerson )
- {
- MuzzleFlash_Shotgun_Player( hEntity, 1 );
- }
- else
- {
- MuzzleFlash_Shotgun_NPC( hEntity, 1 );
- }
- break;
- // UNDONE: These need their own effects/sprites. For now use the pistol
- // SMG1
- #if defined ( HL2MP ) // HACK for hl2mp, make the default muzzleflash the smg muzzleflash for weapons like the RPG that are using 'type 0'
- default:
- #endif // HL2MP
- case MUZZLEFLASH_SMG1:
- if ( firstPerson )
- {
- MuzzleFlash_SMG1_Player( hEntity, 1 );
- }
- else
- {
- MuzzleFlash_SMG1_NPC( hEntity, 1 );
- }
- break;
- // SMG2
- case MUZZLEFLASH_SMG2:
- case MUZZLEFLASH_PISTOL:
- if ( firstPerson )
- {
- MuzzleFlash_Pistol_Player( hEntity, 1 );
- }
- else
- {
- MuzzleFlash_Pistol_NPC( hEntity, 1 );
- }
- break;
- case MUZZLEFLASH_COMBINE:
- if ( firstPerson )
- {
- //FIXME: These should go away
- MuzzleFlash_Combine_Player( hEntity, 1 );
- }
- else
- {
- //FIXME: These should go away
- MuzzleFlash_Combine_NPC( hEntity, 1 );
- }
- break;
- #if !defined ( HL2MP ) // HACK for hl2mp, make the default muzzleflash the smg muzzleflash for weapons like the RPG that are using 'type 0'
- default:
- // There's no supported muzzle flash for the type specified!
- Assert(0);
- break;
- #endif // HL2MP
- }
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment