help me with a tracer -1 reply

Please wait...

Pepepa

I'm too cool to Post

50 XP

8th January 2005

0 Uploads

11 Posts

0 Threads

#1 15 years ago

look my code... i need to trace a line... and in the end of this line make a explosion... but in the code the explosion only is created if the in the end of line is a entity... but i want create the explosion in a wall for example... no just in entities... Help me plx my msn: [email="lkjhgfdsarox@hotmail.com"]lkjhgfdsarox@hotmail.com[/email] Thank all BaseClass::WeaponSound( WPN_DOUBLE ); BaseClass::PrimaryAttack(); CBasePlayer *pOwner = ToBasePlayer( GetOwner() ); Vector forward; pOwner->EyeVectors( &forward ); Vector start = pOwner->Weapon_ShootPosition(); Vector end = start + forward * 4096; trace_t tr; UTIL_TraceLine(start, end, MASK_SHOT, pOwner, COLLISION_GROUP_NONE, &tr); if ( tr.fraction == 1.0 || (tr.surface.flags & SURF_SKY) ) return; CBaseEntity *pHit = tr.m_pEnt; ExplosionCreate(pHit->GetAbsOrigin(), pHit->GetAbsAngles(), pOwner, 30, 0, (SF_ENVEXPLOSION_NOSOUND/*|SF_ENVEXPLOSION_NOFIREBALL|SF_ENVEXPLOSION_NODECAL|SF_ENVEXPLOSION_NOSPARKS|SF_ENVEXPLOSION_NOFIREBALLSMOKE|SF_ENVEXPLOSION_NOPARTICLES*/), 0.0f ); m_flNextPrimaryAttack = gpGlobals->curtime + 0.5f;

m_flNextSecondaryAttack = gpGlobals->curtime + 0.1f; Sorry for my bad english




Ensign Riles Advanced Member

No! I'm Spamacus!

426,537 XP

17th June 2003

0 Uploads

39,480 Posts

1 Threads

#2 15 years ago

Please don't use profanity in thread titles, they can be seen across multiple sites where some of the visitors may not want to subject themselves to that type of language. Thanks. :) Sorry I am brainless when it comes to modding, hopefully someone will be able to answer your shortly...