For whatever it's worth, this functionality of explosion blockage is
implemented in

bool IsExplosionTraceBlocked( trace_t *ptr ) in gamerules.cpp

The ptr has a m_pEnt property that hold the entity that the trace hit.
IsExplosionTraceBlocked is called for entities that the grenade explosion
traces hit in a certain radius. So I just checked to see if the entity that
the explosion hit is one of my classes (a la dynamic_cast) and returned true
if that's the case.

Cheers,
Aditya

On Thu, Jan 1, 2009 at 3:36 PM, Aditya Gaddam <[email protected]>wrote:

> I was trying out collisions groups for my spawned entities and the energy
> ball from the combine rifle, and none of them were working, but collision
> groups seem to have an effect on regular nades. Groups of 5, 8 and some
> others let the grenade and the player collide. Which is awesome!
>
> The problem is that the grenades seem to hurt me on the other side of the
> panels I am spawning. Is this something that would do with collision groups
> too? Suppose I shall poke around a bit more in the grenade code...
>
> Thanks for the help so far Jay and Steve.
>
> - Aditya
>
>
> On Thu, Jan 1, 2009 at 1:02 PM, Jay Stelly <[email protected]> wrote:
>
>> If you are using the frag grenades from hl2 they use collision groups to
>> specifically disable collisions between their physics objects and other
>> objects (NPCs for example).  Then they trace rays to fake it in their
>> VPhysicsUpdate() function.  That allows them to bounce off of the NPCs'
>> hitboxes without those hitboxes actually being in the physics simulation.
>>
>> It's possible that the reason they aren't colliding is this collision rule
>> behavior.  Try changing the collision group of the grenade or the other
>> entity to COLLISION_GROUP_NONE and see if that fixes the problem.
>>
>> Jay
>>
>>
>> > -----Original Message-----
>> > From: [email protected]
>> > [mailto:[email protected]] On Behalf Of
>> > Aditya Gaddam
>> > Sent: Thursday, January 01, 2009 8:32 AM
>> > To: Discussion of Half-Life Programming
>> > Subject: Re: [hlcoders] Grenades going through spawned models
>> >
>> > BUMP. Anyone have any clues about this?
>> >
>> > On Tue, Dec 23, 2008 at 5:41 AM, Aditya Gaddam
>> > <[email protected]>wrote:
>> >
>> > > Hi,
>> > >
>> > > I have project where I am spawning some models
>> > programmatically. They
>> > > collide fine with me and most ammunition (including
>> > rockets, crossbow
>> > > bolts, SMG secondary fire), but grenades and the secondary fire for
>> > > the assault rifle seem to just go through.
>> > >
>> > > The models being spawned derive from CBaseAnimating and have
>> > > SOLID_VPHYSICS via SetSolid. Does anyone have any idea why
>> > this would be?
>> > >
>> > > Thanks,
>> > > Aditya
>> > >
>> > > --
>> > > http://www.pixelfaction.com
>> > > AIM:ApeWithABrain
>> > >
>> >
>> >
>> >
>> > --
>> > http://www.pixelfaction.com
>> > AIM:ApeWithABrain
>> > _______________________________________________
>> > 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
>>
>>
>
>
> --
> http://www.pixelfaction.com
> AIM:ApeWithABrain
>



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

Reply via email to