ensure bot manager is inited when adding a bot

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2754 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-09-25 02:48:12 +00:00
parent 01e0ae6855
commit ec070106c1
+6
View File
@@ -894,6 +894,12 @@ void CBotManager::PickNextTrigger()
botent *CBotManager::CreateBot(const char *team, const char *skill, const char *name)
{
if (m_bInit)
{
Init();
m_bInit = false;
}
botent *m = newbotent();
if (!m) return NULL;
loopi(NUMGUNS) m->ammo[i] = m->mag[i] = 0;