bot fixes, bot use nades & akimbo

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6331 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2011-04-25 15:27:41 +00:00
parent b8dcfdd976
commit 0579f05d22
8 changed files with 322 additions and 352 deletions
+3 -1
View File
@@ -284,12 +284,14 @@ float CBot::GetDistance(entity *e)
bool CBot::SelectGun(int Gun)
{
if(!m_pMyEnt->weapons[Gun]->selectable()) return false;
if(m_pMyEnt->weaponsel->reloading || m_pMyEnt->weaponchanging) return false;
if (m_pMyEnt->gunselect != Gun) audiomgr.playsound(S_GUNCHANGE, m_pMyEnt);
m_pMyEnt->gunselect = Gun;
if(m_pMyEnt->weaponsel->type != Gun)
{
audiomgr.playsound(S_GUNCHANGE, m_pMyEnt);
m_pMyEnt->weaponswitch(m_pMyEnt->weapons[Gun]);
m_iChangeWeaponDelay = lastmillis + 1000;
}
return true;
}