I would not do that in the MyTouch correct?

I drummed up this from the RadiousDamage

        BOOL MyTouch( CBasePlayer *pPlayer ) // was My Touch
        {
                CBaseEntity     *       pEntity =       NULL;
                TraceResult tr;
                Vector          vecSpot;

                while ((pEntity = UTIL_FindEntityInSphere( pEntity,
pev->origin, 600 )) != NULL)
                {
                        vecSpot = pEntity->BodyTarget( pev->origin );
                        UTIL_TraceLine ( pev->origin, vecSpot,
dont_ignore_monsters, ENT(pev), &tr );
                        if ( tr.flFraction == 1.0 || tr.pHit ==
pEntity->edict() ) {
                                UTIL_ScreenFade( pPlayer,
Vector(255,255,255), 10.0, 2.0, 255, FFADE_IN);
                        }
                }
                pev->nextthink = gpGlobals->time + 0.1;
                return TRUE;
        }

As you know by looking... CRASH is the word for the day..

Not to sure where to put the trace code or even if it is correct

-Ron

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Reedbeta
Sent: Wednesday, January 02, 2002 3:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] Items.cpp (MyTouch)


Yes, tracelines are probably the way to go.  Simply loop through the
player slots and for each valid player, do a traceline from the grenade
to the player's eye position (or whatever other position) and if it
doesn't hit anything, you can do whatever the grenade is supposed to do.

--- "Yacketta, Ronald" <[EMAIL PROTECTED]> wrote:
> Have a quick question, just coded a new grenade type. I would like 
> only the players In the FOV of the grenade to be affected by it, that 
> is players behind a wall or obscured by
> Something are not affected.
> 
> I have looked through items.cpp and have not found a decent example 
> (or one at all) Would I need to add some traceline code to the 
> MyTouch? Would actually like
> To trace from the grenade out to find players and affect then, instead
> of from
> The player to the grenade.
> 
> Regards,
> Ron
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,

> please
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online! http://greetings.yahoo.com
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to