mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Use skinname for default bot
This commit is contained in:
parent
fa5fccffc5
commit
24b0c3afd6
1 changed files with 8 additions and 1 deletions
|
|
@ -23,7 +23,8 @@ struct grandprixinfo grandprixinfo;
|
||||||
|
|
||||||
void K_InitGrandPrixBots(void)
|
void K_InitGrandPrixBots(void)
|
||||||
{
|
{
|
||||||
const UINT8 defaultbotskin = 9; // eggrobo
|
const char *defaultbotskinname = "eggrobo";
|
||||||
|
SINT8 defaultbotskin = R_SkinAvailable(defaultbotskinname);
|
||||||
|
|
||||||
// startingdifficulty: Easy = 3, Normal = 6, Hard = 9
|
// startingdifficulty: Easy = 3, Normal = 6, Hard = 9
|
||||||
const UINT8 startingdifficulty = min(MAXBOTDIFFICULTY, (gamespeed + 1) * 3);
|
const UINT8 startingdifficulty = min(MAXBOTDIFFICULTY, (gamespeed + 1) * 3);
|
||||||
|
|
@ -42,6 +43,12 @@ void K_InitGrandPrixBots(void)
|
||||||
UINT8 newplayernum = 0;
|
UINT8 newplayernum = 0;
|
||||||
UINT8 i, j;
|
UINT8 i, j;
|
||||||
|
|
||||||
|
if (defaultbotskin == -1)
|
||||||
|
{
|
||||||
|
// This shouldn't happen, but just in case
|
||||||
|
defaultbotskin = 0;
|
||||||
|
}
|
||||||
|
|
||||||
memset(competitors, MAXPLAYERS, sizeof (competitors));
|
memset(competitors, MAXPLAYERS, sizeof (competitors));
|
||||||
memset(botskinlist, defaultbotskin, sizeof (botskinlist));
|
memset(botskinlist, defaultbotskin, sizeof (botskinlist));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue