now it work :D ty
2014-08-31 2:48 GMT+03:00 Matas Lesinskas <peon...@gmail.com>: > TraceResult tr; > UTIL_MakeAimVectors( pev->angles ); > Vector vecStart = pev->origin; > vecStart.z += pev->size.z * 0.5; > Vector vecEnd = vecStart + (gpGlobals->v_forward * 100 ); > UTIL_TraceHull( vecStart, vecEnd, dont_ignore_monsters, head_hull, > ENT(pev), &tr ); > > CBaseEntity *pEntity = CBaseEntity::Instance( tr.pHit ); > if ( pEntity->pev->flags & (FL_MONSTER) ) > { > if ( tr.pHit ) > { > > pEntity->TakeDamage( pev, pev, 0, DMG_SLASH ); > pEntity->pev->velocity = pEntity->pev->velocity + gpGlobals->v_forward * > 250; > } > } > > > 2014-08-31 2:35 GMT+03:00 Tom Schumann <schumann....@gmail.com>: > > Looking at how the other weapons work it looks like you need to do a trace >> from your weapon in the direction that you're facing and then you can use >> the edict_t* in the trace result. >> Check out what CCrowbar::Swing does. >> >> >> On 30 August 2014 23:26, Matas Lesinskas <peon...@gmail.com> wrote: >> >>> any ideas how to make weapon to push zombie away. >>> >>> I think somethink like this, but how to target zombie, not (m_pPlayer) >>> >>> m_pPlayer->pev->velocity = m_pPlayer->pev->velocity + >>> gpGlobals->v_forward * 100; >>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders >>> >>> >>> >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders >> >> >> >
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders