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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user