Ejemplo n.º 1
0
void FCajunMaster::Init ()
{
    botnum = 0;
    firstthing = NULL;
    spawn_tries = 0;
    freeze = false;
    observer = false;
    body1 = NULL;
    body2 = NULL;

    if (ctf && teamplay == false)
        teamplay = true; //Need teamplay for ctf. (which is not done yet)

    t_join = (wanted_botnum + 1) * SPAWN_DELAY; //The + is to let player get away before the bots come in.

    if (botinfo == NULL)
    {
        LoadBots ();
    }
    else
    {
        botinfo_t *thebot = botinfo;

        while (thebot != NULL)
        {
            thebot->inuse = BOTINUSE_No;
            thebot = thebot->next;
        }
    }
}
Ejemplo n.º 2
0
void FCajunMaster::Init ()
{
	int i;

	botnum = 0;
	firstthing = NULL;
	spawn_tries = 0;
	freeze = false;
	observer = false;
	body1 = NULL;
	body2 = NULL;

	//Remove all bots upon each level start, they'll get spawned instead.
	for (i = 0; i < MAXPLAYERS; i++)
	{
		waitingforspawn[i] = false;
		if (playeringame[i] && players[i].isbot)
		{
			CleanBotstuff (&players[i]);
			players[i].isbot = false;
			botingame[i] = false;
		}
	}

	if (ctf && teamplay == false)
		teamplay = true; //Need teamplay for ctf. (which is not done yet)

	t_join = (wanted_botnum + 1) * SPAWN_DELAY; //The + is to let player get away before the bots come in.

	if (botinfo == NULL)
	{
		LoadBots ();
	}
	else
	{
		botinfo_t *thebot = botinfo;

		while (thebot != NULL)
		{
			thebot->inuse = false;
			thebot = thebot->next;
		}
	}
}