Thats what I'm trying to do yeah. but its not the muzzle flash. There are
two events for that one for player and one for npc so thats no problem. This
is with regard to the ejectbrass1 event that handles the ejecting the shells
when firing weapons.

My entire case looks like this.


case CL_EVENT_EJECTBRASS1:

if ( m_Attachments.Count() > 0 )

{

 C_BaseCombatWeapon *pWeapon = GetActiveWeapon();

if (!pWeapon)

break;

C_BasePlayer *pPlayer = C_BasePlayer::GetLocalPlayer();

if (!pPlayer)

break;

C_BaseCombatCharacter *pOwner = ( pWeapon->GetOwner() );

if (!pOwner)

break;



bool bIsLocalPlayer = pPlayer && pPlayer == pOwner;

if ( bIsLocalPlayer )

{

*pWeapon = GetActiveWeapon();

if ( !pWeapon )

break;



if( pWeapon->GetAttachment( LookupAttachment( "1" ), attachOrigin,
attachAngles ) )

{

tempents->EjectBrass( attachOrigin, attachAngles, GetAbsAngles(), atoi(
options ) );

}

}

else

{

break;

}

}

break;



At the moment it runs the event when the player fires as well as when the
enemy fires.
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to