Ah, I hadn't come across filters - Thanks!

Tony "omega" Sergi wrote:
--
[ Picked text/plain from multipart/alternative ]
this should do it, but i didn't test it, so be warned. (i just made sure it
would compile)
util_shared.h
------------------
class CTraceFilterNoPlayers : public CTraceFilter
{
public:
    CTraceFilterNoPlayers() {}
    virtual bool ShouldHitEntity( IHandleEntity *pServerEntity, int
contentsMask );
};
util_shared.cpp
----------------------
bool CTraceFilterNoPlayers::ShouldHitEntity( IHandleEntity *pServerEntity,
int contentsMask )
{
    if ( !StandardFilterRules( pServerEntity, contentsMask ) )
        return false;

    CBaseEntity *pEntity = EntityFromEntityHandle( pServerEntity );
    return !pEntity->IsPlayer();
}


On 2/11/07, Tony omega Sergi <[EMAIL PROTECTED]> wrote:

make a new filter that ignores CLASS_PLAYER ;)

On 2/11/07, Richard <[EMAIL PROTECTED]> wrote:

That bit is done and works fine, I'm talking about MakeBeam() in
grenade_tripmine.cpp which shoots a traceline to see where the beam
should be drawn to. It stops on the first player hit, which I don't want
to happen, I want it to go through the player and hit the first non
player item in it's path.

If this doesn't happen, the beam only gets drawn up to the first player
that is in front of it.
Thanks,

R.

Rodrigo 'r2d2rigo' Diaz wrote:

--
[ Picked text/plain from multipart/alternative ]
Just get the entity touched by the traceline and then check if it is a

player. If that player's team is the same as the tripmine's owner,

then do

nothing.
--

_______________________________________________
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



--
-omega





--
-omega
--

_______________________________________________
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