Remove this code, it's in grand-pricks & functional now

This commit is contained in:
Sally Coolatta 2020-05-18 15:19:48 -04:00
parent 0282615c38
commit c3a5193150

View file

@ -197,147 +197,6 @@ void K_UpdateMatchRaceBots(void)
// We should have enough bots now :)
}
#if 0
// This is mostly just pesudo code right now...
void K_InitGrandPrixBots(void)
{
const UINT8 defaultbotskin = 9; // eggrobo
// startingdifficulty: Easy = 3, Normal = 6, Hard = 9
const UINT8 startingdifficulty = min(MAXBOTDIFFICULTY, (cv_kartspeed.value + 1) * 3);
UINT8 difficultylevels[MAXPLAYERS];
UINT8 playercount = 8;
UINT8 wantedbots = 0;
UINT8 numplayers = 0;
UINT8 competitors[4];
boolean skinusable[MAXSKINS];
UINT8 botskinlist[MAXPLAYERS];
UINT8 botskinlistpos = 0;
UINT8 i;
memset(difficultylevels, MAXBOTDIFFICULTY, sizeof (difficultylevels));
memset(competitors, MAXPLAYERS, sizeof (competitors));
memset(botskinlist, defaultbotskin, sizeof (botskinlist));
// init usable bot skins list
for (i = 0; i < MAXSKINS; i++)
{
if (i < numskins)
{
skinusable[i] = true;
}
else
{
skinusable[i] = false;
}
}
// init difficulty levels list
//if (!mastermodebots) {
difficultylevels[MAXPLAYERS] = {
max(1, startingdifficulty),
max(1, startingdifficulty-1),
max(1, startingdifficulty-2),
max(1, startingdifficulty-3),
max(1, startingdifficulty-3),
max(1, startingdifficulty-4),
max(1, startingdifficulty-4),
max(1, startingdifficulty-4),
max(1, startingdifficulty-5),
max(1, startingdifficulty-5),
max(1, startingdifficulty-6),
max(1, startingdifficulty-6),
max(1, startingdifficulty-7),
max(1, startingdifficulty-7),
max(1, startingdifficulty-8),
max(1, startingdifficulty-8),
};
for (i = 0; i < MAXPLAYERS; i++)
{
if (numplayers < MAXSPLITSCREENPLAYERS)
{
if (playeringame[i] && !players[i].spectator)
{
competitors[numplayers] = i;
numplayers++;
}
}
else
{
if (playeringame[i])
{
players[i].spectator = true; // force spectate for all other players, if they happen to exist?
}
}
}
if (numplayers > 2)
{
// Add 3 bots per player beyond 2P
playercount += (numplayers-2) * 3;
}
wantedbots = playercount - numplayers;
// Create rival list
// TODO: Use player skin's set rivals
// Starting with P1's rival1, P2's rival1, P3's rival1, P4's rival1,
// then P1's rival2, P2's rival2, etc etc etc etc.......
// then skip over any duplicates.
// Pad the remaining list with random skins if we need to
if (botskinlistpos < wantedbots)
{
for (i = botskinlistpos; i < wantedbots; i++)
{
UINT8 val = M_RandomKey(numskins);
UINT8 loops = 0;
while (!skinusable[val])
{
if (loops >= numskins)
{
// no more skins
break;
}
val++;
if (val >= numskins)
{
val = 0;
}
loops++;
}
if (loops >= numskins)
{
// leave the rest of the table as the default skin
break;
}
botskinlist[i] = val;
skinusable[val] = false;
}
}
for (i = 0; i < wantedbots; i++)
{
if (!K_AddBot(botskinlist[i], difficultylevels[i], &newplayernum))
{
break;
}
}
}
#endif
boolean K_PlayerUsesBotMovement(player_t *player)
{
if (player->bot || player->exiting)