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