- Handle level in bot code
This commit is contained in:
parent
14971c8c3a
commit
06e5dd1d86
6 changed files with 14 additions and 14 deletions
|
|
@ -340,7 +340,7 @@ bool FCajunMaster::SpawnBot (const char *name, int color)
|
|||
return true;
|
||||
}
|
||||
|
||||
void FCajunMaster::TryAddBot (uint8_t **stream, int player)
|
||||
void FCajunMaster::TryAddBot (FLevelLocals *Level, uint8_t **stream, int player)
|
||||
{
|
||||
int botshift = ReadByte (stream);
|
||||
char *info = ReadString (stream);
|
||||
|
|
@ -363,7 +363,7 @@ void FCajunMaster::TryAddBot (uint8_t **stream, int player)
|
|||
}
|
||||
}
|
||||
|
||||
if (DoAddBot ((uint8_t *)info, skill))
|
||||
if (DoAddBot (Level,(uint8_t *)info, skill))
|
||||
{
|
||||
//Increment this.
|
||||
botnum++;
|
||||
|
|
@ -384,7 +384,7 @@ void FCajunMaster::TryAddBot (uint8_t **stream, int player)
|
|||
delete[] info;
|
||||
}
|
||||
|
||||
bool FCajunMaster::DoAddBot (uint8_t *info, botskill_t skill)
|
||||
bool FCajunMaster::DoAddBot (FLevelLocals *Level, uint8_t *info, botskill_t skill)
|
||||
{
|
||||
int bnum;
|
||||
|
||||
|
|
@ -405,7 +405,7 @@ bool FCajunMaster::DoAddBot (uint8_t *info, botskill_t skill)
|
|||
D_ReadUserInfoStrings (bnum, &info, false);
|
||||
|
||||
multiplayer = true; //Prevents cheating and so on; emulates real netgame (almost).
|
||||
players[bnum].Bot = level.CreateThinker<DBot>();
|
||||
players[bnum].Bot = Level->CreateThinker<DBot>();
|
||||
players[bnum].Bot->player = &players[bnum];
|
||||
players[bnum].Bot->skill = skill;
|
||||
playeringame[bnum] = true;
|
||||
|
|
@ -417,11 +417,11 @@ bool FCajunMaster::DoAddBot (uint8_t *info, botskill_t skill)
|
|||
else
|
||||
Printf ("%s joined the game\n", players[bnum].userinfo.GetName());
|
||||
|
||||
level.DoReborn (bnum, true);
|
||||
Level->DoReborn (bnum, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void FCajunMaster::RemoveAllBots (bool fromlist)
|
||||
void FCajunMaster::RemoveAllBots (FLevelLocals *Level, bool fromlist)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue