- Made DBot inherit from DObject.

This commit is contained in:
ChillyDoom 2014-10-15 17:54:12 +01:00
commit c400dcf736
6 changed files with 41 additions and 21 deletions

View file

@ -352,6 +352,9 @@ void FCajunMaster::DoAddBot (BYTE **stream)
skill.isp = ReadByte (stream);
D_ReadUserInfoStrings (bnum, &infob, false);
delete[] info;
if (!deathmatch && playerstarts[bnum].type == 0)
{
Printf ("%s tried to join, but there was no player %d start\n",
@ -423,6 +426,18 @@ void FCajunMaster::RemoveAllBots (bool fromlist)
botnum = 0;
}
void FCajunMaster::DestroyAllBots ()
{
for (int i = 0; i < MAXPLAYERS; ++i)
{
if (players[i].Bot != NULL)
{
players[i].Bot->Destroy ();
players[i].Bot = NULL;
}
}
}
//------------------
//Reads data for bot from