View Single Post
Re: Yay - Bots move to given vector location...
Old
  (#33)
dub
Member
 
dub's Avatar
 
Status: Offline
Posts: 89
Join Date: Aug 2004
Location: UK
Default Re: Yay - Bots move to given vector location... - 12-01-2005

solution to getting weapon information.

add to the bot_t structure this
Code:
  CBaseCombatCharacter *pBaseCombatChar;
then after the CBaseEntity hack by stevec add this
Code:
  pBot->pBaseCombatChar = pBot->pBaseEntity->MyCombatCharacterPointer ();
to access info about the current weapon all you need to do is this
Code:
  CBaseCombatWeapon *pCurrentWeapon = pBot->pBaseCombatChar->GetActiveWeapon ();
enjoy Dubb
  
Reply With Quote