IsPlayer will always be valid, its set when a player entity is created and
only for player ents. Only one other check I would suggest if you are using
bots would be if the player is fake.

On Wed, Feb 25, 2009 at 8:57 AM, Yorg Kuijs <[email protected]> wrote:

> I have it looking like this now:
>    CBasePlayer *pAttacker = ( CBasePlayer* )inputInfo.GetAttacker();
>    bool bAttackerIsPlayer = pAttacker->IsPlayer();
>
>    if ( pAttacker != this && bAttackerIsPlayer && inputInfo.GetDamage()
>  > 0 )
>    {
>        CRecipientFilter filter;
>        filter.AddRecipient( pAttacker );
>        filter.MakeReliable();
>
>        //send announcement to play
>        UserMessageBegin( filter, "SendAudio" );
>        WRITE_STRING( "HitSound.Blip" );
>        MessageEnd();
>    }
>
> Crashes are at least gone with this, any idea if it will actually work
> though? sending the sound to the attacker?
>
> James Gray wrote:
> > pBaseEntity->IsPlayer()
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
~Ryan ( skidz )
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to