Hey,

You could just dynamic_cast the entity it to CBasePlayer and check whether  
the pointer is NULL or not ;)

Emiel Regis
www.invision-games.com

On Wed, 25 Feb 2009 15:51:15 -0000, Yorg Kuijs <[email protected]> wrote:

> Hey list,
>
> I have implemented a hitsound system now, with some help from here,
> although I'm not 100% sure, anyway when testing alone though I found out
> that the game crashes if it has to send the hitsound to an attacker
> that's not the player(mostly just the world, like hurting water).
>
> I fixed it by making by modifying CTakeDamageInfo to have a bool for
> checking if the attacker is a player.
> This seems to work fine but it's a rather rubbish fix if you ask me,
> does anybody know of a better way to see if the attacker is a player?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,  
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to