View Single Post
crowbars and botman's "bot 10"
Old
  (#1)
Lord_Draco
Member
 
Lord_Draco's Avatar
 
Status: Offline
Posts: 2
Join Date: Jan 2005
Location: Hervey Bay, Australia
Default crowbars and botman's "bot 10" - 02-01-2005

Hi, I haven't got a clue about bots but I have put the bot code from botman's "bot 10" in my MOD. I need to make the bots use the crowbar across all skill levels(the 3 lowest ones dont use it at all) but can't figure out how to make it do that. I think it's in this part of bot_combat.cpp

Code:
  // if bot is carrying the crowbar...
      if (pev->weapons & (1<
      {
 	// if close to enemy, and skill level is 1, 2 or 3, use the crowbar
 	if (((distance <= 40) && (weapon_choice == 0)) ||
 	(weapon_choice == WEAPON_CROWBAR))
 	{
 		 new_weapon = weapon_ptr[WEAPON_CROWBAR];
   
 		 // check if the bot isn't already using this item...
 		 if (m_pActiveItem != new_weapon)
 			 SelectItem("weapon_crowbar");  // select the crowbar
   
 		 pev->button |= IN_ATTACK;  // use primary attack (whack! whack!)
   
 		 // set next time to "shoot"
 		 f_shoot_time = gpGlobals->time + 0.3 + 
 		 RANDOM_FLOAT(primary_fire_delay[WEAPON_CROWBAR][bot_skill][0],
 		 primary_fire_delay[WEAPON_CROWBAR][bot_skill][1]);
 		 return TRUE;
  	}   
      }
what I don't understand is, where is the skill checked?
  
Reply With Quote