Allow bots to switch to knife or pistol + less useless reloads
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6322 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -284,9 +284,13 @@ float CBot::GetDistance(entity *e)
|
||||
|
||||
bool CBot::SelectGun(int Gun)
|
||||
{
|
||||
if(m_pMyEnt->weaponsel->reloading) 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)
|
||||
{
|
||||
m_pMyEnt->weaponswitch(m_pMyEnt->weapons[Gun]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user