In DM, you can pick up a grenade and throw it throw its owner. The code on the frag is: "SetThrower( pPhysGunUser );" And that changes m_pThrower...
Can the owner get changed? or do I have to recreate my frags when the grav gun picks it up... -G --- Tom Leighton <[EMAIL PROTECTED]> wrote: > Although when the gravity gun picks up an entity, it sets its owner > to > the person holding the gravity gun doesnt it? > > Andrew Watkins wrote: > > I can't help with the physics interaction behaviour, but as for > passing > > through its owner, this is because you're set as its owner! > > In source, no entity can interact with its owner. Somewhere in your > > grenade > > creation code, you'll see a call to SetOwner or SetOwnerEntity... > if you > > don't care about giving the player a score for a kill with this > grenade, > > just remove this line. If you do care, which is a situation I've > often > > found > > myself in, I would add a new variable, called something like > > m_pMyThrower, > > and set this to the player that threw it. Then, when the damage is > being > > caused, set the attacker to m_pMyThrower instead of GetOwner(). > Voila! > > > > Winston > > > >> Date: Sun, 13 Jan 2008 11:31:01 -0800 (PST) > >> From: Grash <[EMAIL PROTECTED]> > >> To: [email protected] > >> Subject: [hlcoders] HL2DM Frags Questions... > >> Reply-To: [email protected] > >> > >> I'm working on mod'ing the frag grenades from HL2DM to simulate a > >> baseball like object. > >> > >> > >> Here's what I've done so far: > >> > >> I've removed the explosion from the grenade. It no longer deals > any > >> radial damage. I did this by overriding the detonate and explode > >> methods within CfragGrenade. > >> > >> The damage that being done is through the VUpdatePhysics method. > The > >> code refers to the damage it's doing there as a slight bonk, I'm > >> overriding the damage amount to what I want. and it this works > well. > >> (I'm also removing the frag if it does damage this way) > >> > >> > >> Here's two issues I'm not sure how to fix... > >> > >> 1. The frag doesn't deal any damage to func_breakable or > >> func_breakable_surf ...that is no window breaking... but will > interact > >> with a breakable_surf that is already broken. This is the normal > >> behavior of un-modded frag grenades. > >> > >> 2. If I throw\drop a frag. my buddy picks it up with the grav-gun > and > >> then punts it back at me. The Frag will pass through me as if I > wasn't > >> there and dealing no damage. > >> > >> -Grash > > > > > > _______________________________________________ > > 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 > > ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

