Re: [hlcoders] Bullets go through custom entity

2006-06-10 Thread Giancarlo Rivas
--
[ Picked text/plain from multipart/alternative ]
Thank you. Haven't tried without your snippet and without other changes I
did, but ultimately the main problem was that I was setting the player as
owner of the missile BaseEntity Create( "missile", vectors, pPlayer ),
damn... Didn't find the part of code that says that bullets get included in
the dont-test-against-parent but sending null made everything work.
--

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



Re: [hlcoders] Bullets go through custom entity

2006-06-09 Thread Michael Kramer
--
[ Picked text/plain from multipart/alternative ]
I think that you need to create the method OnTakeDamage(),

int CMissle::OnTakeDamage( const CTakeDamageInfo &info )
{
if ( info.GetDamageType() & DMG_BULLETS )
{
CTakeDamageInfo dmgInfo = info;
dmgInfo.ScaleDamage( 10.0 );
return BaseClass::OnTakeDamage( dmgInfo );
}

return BaseClass::OnTakeDamage( info );
}
--

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



[hlcoders] Bullets go through custom entity

2006-06-09 Thread Giancarlo Rivas
--
[ Picked text/plain from multipart/alternative ]
I hope it's a simple question, I have a server side entity (as in, the files
aren't on the client solution), a missile. They inherit from
CBaseCombatCharacter, and work as expected except one thing, bullets go
through it without dealing any damage.

I guess they need some flag or something. Right now they are spawned like
this:
SetSolid( SOLID_BBOX );
SetModel( MODEL );
SetSize( -Vector(4,4,4), Vector(4,4,4) );
SetTouch( &CMissile::MissileTouch );
SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE );

m_takedamage = DAMAGE_YES;
m_iHealth = m_iMaxHealth = 1;
m_bloodColor = DONT_BLEED;
AddFlag( FL_OBJECT );
AddSolidFlags( FSOLID_NOT_SOLID );

(later)
SetMoveType( MOVETYPE_FLY );
RemoveSolidFlags( FSOLID_NOT_SOLID );

(and also)
unsigned int CMissile::PhysicsSolidMaskForEntity( void ) const
{
return BaseClass::PhysicsSolidMaskForEntity() | CONTENTS_HITBOX;
}

Would any of those be killing the interaction with bullets? Or maybe I'm
missing a flag.
--

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