mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix not being able to use map command to go to SS
This commit is contained in:
parent
a6e1731538
commit
526a2b7de1
1 changed files with 59 additions and 58 deletions
117
src/d_netcmd.c
117
src/d_netcmd.c
|
|
@ -2881,7 +2881,7 @@ static void Command_Map_f(void)
|
||||||
if (mapheaderinfo[newmapnum-1])
|
if (mapheaderinfo[newmapnum-1])
|
||||||
{
|
{
|
||||||
// Let's just guess so we don't have to specify the gametype EVERY time...
|
// Let's just guess so we don't have to specify the gametype EVERY time...
|
||||||
newgametype = (mapheaderinfo[newmapnum-1]->typeoflevel & TOL_RACE) ? GT_RACE : GT_BATTLE;
|
newgametype = (mapheaderinfo[newmapnum-1]->typeoflevel & TOL_BATTLE) ? GT_BATTLE : GT_RACE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2930,11 +2930,59 @@ static void Command_Map_f(void)
|
||||||
|
|
||||||
if (!(netgame || multiplayer))
|
if (!(netgame || multiplayer))
|
||||||
{
|
{
|
||||||
|
grandprixinfo.gamespeed = (cv_kartspeed.value == KARTSPEED_AUTO ? KARTSPEED_NORMAL : cv_kartspeed.value);
|
||||||
|
grandprixinfo.masterbots = false;
|
||||||
|
|
||||||
|
if (option_skill)
|
||||||
|
{
|
||||||
|
const char *skillname = COM_Argv(option_skill + 1);
|
||||||
|
INT32 newskill = -1;
|
||||||
|
INT32 j;
|
||||||
|
|
||||||
|
for (j = 0; gpdifficulty_cons_t[j].strvalue; j++)
|
||||||
|
{
|
||||||
|
if (!strcasecmp(gpdifficulty_cons_t[j].strvalue, skillname))
|
||||||
|
{
|
||||||
|
newskill = (INT16)gpdifficulty_cons_t[j].value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!gpdifficulty_cons_t[j].strvalue) // reached end of the list with no match
|
||||||
|
{
|
||||||
|
INT32 num = atoi(COM_Argv(option_skill + 1)); // assume they gave us a skill number, which is okay too
|
||||||
|
if (num >= KARTSPEED_EASY && num <= KARTGP_MASTER)
|
||||||
|
newskill = (INT16)num;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newskill != -1)
|
||||||
|
{
|
||||||
|
if (newskill == KARTGP_MASTER)
|
||||||
|
{
|
||||||
|
grandprixinfo.gamespeed = KARTSPEED_HARD;
|
||||||
|
grandprixinfo.masterbots = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
grandprixinfo.gamespeed = newskill;
|
||||||
|
grandprixinfo.masterbots = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
grandprixinfo.encore = newencoremode;
|
||||||
|
|
||||||
|
grandprixinfo.gp = true;
|
||||||
|
grandprixinfo.roundnum = 0;
|
||||||
|
grandprixinfo.cup = NULL;
|
||||||
|
grandprixinfo.wonround = false;
|
||||||
|
grandprixinfo.initalize = true;
|
||||||
|
|
||||||
|
grandprixinfo.eventmode = GPEVENT_NONE;
|
||||||
|
|
||||||
if (newgametype == GT_BATTLE)
|
if (newgametype == GT_BATTLE)
|
||||||
{
|
{
|
||||||
grandprixinfo.gp = false;
|
grandprixinfo.eventmode = GPEVENT_BONUS;
|
||||||
specialStage.active = false;
|
|
||||||
K_ResetBossInfo();
|
|
||||||
|
|
||||||
if (mapheaderinfo[newmapnum-1] &&
|
if (mapheaderinfo[newmapnum-1] &&
|
||||||
mapheaderinfo[newmapnum-1]->typeoflevel & TOL_BOSS)
|
mapheaderinfo[newmapnum-1]->typeoflevel & TOL_BOSS)
|
||||||
|
|
@ -2942,71 +2990,24 @@ static void Command_Map_f(void)
|
||||||
bossinfo.boss = true;
|
bossinfo.boss = true;
|
||||||
bossinfo.encore = newencoremode;
|
bossinfo.encore = newencoremode;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bossinfo.boss = false;
|
||||||
|
K_ResetBossInfo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (mapheaderinfo[newmapnum-1] &&
|
if (mapheaderinfo[newmapnum-1] &&
|
||||||
mapheaderinfo[newmapnum-1]->typeoflevel & TOL_SPECIAL) // Special Stage
|
mapheaderinfo[newmapnum-1]->typeoflevel & TOL_SPECIAL) // Special Stage
|
||||||
{
|
{
|
||||||
grandprixinfo.gp = false;
|
|
||||||
bossinfo.boss = false;
|
|
||||||
|
|
||||||
specialStage.active = true;
|
specialStage.active = true;
|
||||||
specialStage.encore = newencoremode;
|
specialStage.encore = newencoremode;
|
||||||
|
grandprixinfo.eventmode = GPEVENT_SPECIAL;
|
||||||
}
|
}
|
||||||
else // default GP
|
else
|
||||||
{
|
{
|
||||||
grandprixinfo.gamespeed = (cv_kartspeed.value == KARTSPEED_AUTO ? KARTSPEED_NORMAL : cv_kartspeed.value);
|
|
||||||
grandprixinfo.masterbots = false;
|
|
||||||
|
|
||||||
if (option_skill)
|
|
||||||
{
|
|
||||||
const char *skillname = COM_Argv(option_skill + 1);
|
|
||||||
INT32 newskill = -1;
|
|
||||||
INT32 j;
|
|
||||||
|
|
||||||
for (j = 0; gpdifficulty_cons_t[j].strvalue; j++)
|
|
||||||
{
|
|
||||||
if (!strcasecmp(gpdifficulty_cons_t[j].strvalue, skillname))
|
|
||||||
{
|
|
||||||
newskill = (INT16)gpdifficulty_cons_t[j].value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gpdifficulty_cons_t[j].strvalue) // reached end of the list with no match
|
|
||||||
{
|
|
||||||
INT32 num = atoi(COM_Argv(option_skill + 1)); // assume they gave us a skill number, which is okay too
|
|
||||||
if (num >= KARTSPEED_EASY && num <= KARTGP_MASTER)
|
|
||||||
newskill = (INT16)num;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newskill != -1)
|
|
||||||
{
|
|
||||||
if (newskill == KARTGP_MASTER)
|
|
||||||
{
|
|
||||||
grandprixinfo.gamespeed = KARTSPEED_HARD;
|
|
||||||
grandprixinfo.masterbots = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
grandprixinfo.gamespeed = newskill;
|
|
||||||
grandprixinfo.masterbots = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
grandprixinfo.encore = newencoremode;
|
|
||||||
|
|
||||||
grandprixinfo.gp = true;
|
|
||||||
grandprixinfo.roundnum = 0;
|
|
||||||
grandprixinfo.cup = NULL;
|
|
||||||
grandprixinfo.wonround = false;
|
|
||||||
|
|
||||||
bossinfo.boss = false;
|
|
||||||
specialStage.active = false;
|
specialStage.active = false;
|
||||||
|
|
||||||
grandprixinfo.initalize = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue