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="firstname.lastname@example.org"]email@example.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
No! I'm Spamacus!
17th June 2003
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...