the only time it's ever populated is if the weapon doing the damage actually sets it while constructing the damage info. default code, ie: single player, does not afaik. (look at FireBullets)
On Sun, Dec 14, 2014 at 12:48 AM, David Buckley <druck...@gmail.com> wrote: > > Hi, > > I've been trying to record the weapon used on damage (using OnTakeDamage > in basecombatcharacter.cpp). Unfortunately, the CTakeDamageInfo object > doesn't seem to return a valid weapon with GetWeapon (it's NULL). It's > possible the m_hWeapon variable in CTakeDamageInfo is never set? > > Is this the case, and if so, how do I figure out which weapon was used to > cause damage? > > Many thanks > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders > > > -- -Tony
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders